Problem with .war files

          I have created a .war file with my servlets in
          /WEB-INF/classes directory and all other classes jared into a single jar file
          in /WEB-INF/lib,but on calling the servlet only those classes that the servlet
          uses directly are recognized but for the other classes it gives an exception NoClassDef
          found.I later changed the .war file so that all the classes are put into /WEB-INF/classes
          directory directly(no jar),but this time it again fails with the same excception,is
          this a bug in weblogic or am I doing things wrong.please clarify.
          thanks and regards
          vijay
          

Bobby,
          This appears to be a known problem and has been addressed by CR065104. Please
          contact support to obtain the appropriate patch.
          Thanks,
          Simon
          Developer Relations Engineer
          BEA Support
          Bobby Nations wrote:
          > Vijay,
          >
          > You're not alone, I'm experiencing these problems when moving a .war file
          > from WLS 6.1.0 to WLS 6.1.2. I'm running WLS 6.1.0 on my development
          > server, and whenever I deploy a .war file there, it finds the jar files
          > in WEB-INF/lib and handles everything properly. I move that exact .war
          > file to my staging server (one rung below production) along with the
          > config.xml and start script from development, and blammo, no go. It
          > complains of ClassNotFound for any class contained in a jar file under
          > the WEB-INF/lib directory. So, my symptoms break down like so: works for
          > WLS 6.1.0 but not for WLS 6.1.2.
          >
          > I think that this must be a bug in service pack 2 of WLS 6.1.
          >
          > Bobby
          >
          > In article <3bbc80e9$[email protected]>, "Vijayanand.R"
          > <[email protected]> wrote:
          >
          > > Hi Udit,
          > > thanks for the reply,
          > > the package under WEB-INF/classes is fine,it invokes the servlet too but
          > > it fails to recognize the jar under WEB-INF/lib and complains that the
          > > particular class it is looking for is not found
          > > Regards
          > > Vijay
          

Similar Messages

  • Problems with war file,popups and forms

    Hi All,
    we are using adf faces and jdeveloper 11g for our project.
    Development work and all have happened fine, but we are facing few problems when we created the war file of the project and deployed it on tomcat 6.0 .
    The major problem we are facing after the deployment of war on tomcat 6.0 is:
    Popus (the popups we created and calender popups) are not showing up. The page simply refreshes when click on the popup link. There are no exceptions thrown, no errors in tomcat logs. The same thing is happeing for calender popups also.
    We are using the following code for popup creation:
    <af:popup id="mypop" eventContext="self">
    <table>
    <af:spacer width="10" height="20"/>
    <tr>
    <td>Name:</td>
    <td>
    <af:inputText columns="20" required="true" value="#{FL.name}"/>
    </td>
    </tr>
    </table>
    <table>
    <tr>
    <td>
    <af:commandButton text="Submit" action="#{FL.ValidateName}"/>
    </td>
    </tr>
    <af:spacer width="10" height="10"/>
    <tr>
    <td>
    <af:outputText value="(*) Marked fields are compulsory"/>
    </td>
    </tr>
    </table>
    </af:popup>
    <af:commandLink>
    ADD Name
    <af:showPopupBehavior popupId="mypop" align="endBefore"
    triggerType="action"/>
    </af:commandLink>
    the following jars are included in web-inf/lib folder:
    adf-controller-api.jar
    adf-controller-rt-common.jar
    adf-controller.jar
    adf-faces-databinding-rt.jar
    adf-pageflow-dtrt.jar
    adf-pageflow-fwk.jar
    adf-pageflow-impl.jar
    adf-pageflow-rc.jar
    adf-richclient-api-11.jar
    adf-richclient-impl-11.jar
    adf-share-base.jar
    adf-share-ca.jar
    adf-share-support.jar
    adflibfilter.jar
    adflogginghandler.jar
    adfm.jar
    adfmweb.jar
    cache.jar
    commons-el.jar
    commons-logging-1.1.1.jar
    db-ca.jar
    dms.jar
    dvt-faces.jar
    dvt-jclient.jar
    dvt-utils.jar
    fmw_audit.jar
    glassfish.jstl_1.2.0.1.jar
    identitystore.jar
    inspect4.jar
    javatools-nodeps.jar
    javax.management.j2ee_1.0.jar
    jaxen-full.jar
    jdbc2_0-stdext.jar
    jewt4.jar
    jmxframework.jar
    jmxspi.jar
    jps-api.jar
    jps-common.jar
    jps-ee.jar
    jps-internal.jar
    jps-unsupported-api.jar
    jsf-api.jar
    jsf-impl.jar
    jsf-ri.jar
    jstl.jar
    log4j.jar
    mdsrt.jar
    ojdbc14_g.jar
    ojdl.jar
    oracle-el.jar
    oraclepki.jar
    org.apache.commons.beanutils_1.6.jar
    559,366 org.apache.commons.collections_3.1.jar
    org.apache.commons.logging_1.0.4.jar
    osdt_cert.jar
    osdt_core.jar
    saxpath.jar
    share.jar
    standard.jar
    trinidad-api.jar
    trinidad-impl.jar
    wls-api.jar
    xalan.jar
    xercesImpl.jar
    xml-apis.jar
    xmlef.jar
    xmlparserv2.jar
    We are struggling to find a solution for this.
    Any suggestions on this will be highly appreciated.
    Thank you.

    Hi,
    please try removing all your HTML elements and just use ADF Faces components. Chances are that mixing HTML with JSF components, though possible in JSF 1.2 causes this conflict
    Frank

  • Problem with WAR file

    Hi all, I am having an issue with deploying a WAR file on WebLogic
              6.1 (SP2). I am using JDK 1.3.1. The error messages I recieve in the
              log are as follows:
              Any help would be much appreciated.
              Thanks, Marko
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(Deployed)
              modified from (true) to (false).>
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(Path) modified
              from (C:\bea\wlserver6.0\config\petstore\applications) to
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war).>
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(LastModified)
              modified from (993490876958) to (993490986115).>
              ####<Jun 25, 2001 1:43:06 PM EDT> <Error> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141004>
              <IOException opening application petstore:Name=algoam,Type=Application,
              loading from path
              C:\bea\wlserver6.0\config\petstore\applications\algoam.war>
              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:110)
              at java.util.jar.JarFile.<init>(JarFile.java:115)
              at java.util.jar.JarFile.<init>(JarFile.java:82)
              at weblogic.utils.jars.VirtualJarFile.<init>(VirtualJarFile.java:24)
              at
              weblogic.management.mbeans.custom.Application.adminLoad(Application.java:257)
              at
              weblogic.management.mbeans.custom.Application.load(Application.java:230)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:562)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:548)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:285)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
              at $Proxy7.load(Unknown Source)
              at
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:462)
              at
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:380)
              at
              weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManager.java:152)
              at
              weblogic.management.mbeans.custom.ApplicationManager$ApplicationPoller.run(ApplicationManager.java:643)
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(LoadError)
              modified from (null) to (java.util.zip.ZipException: error in opening
              zip file).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application) Attribute=(Name)
              modified from (AssetManagement) to (AssetManagement).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application) Attribute=(Path)
              modified from (null) to
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application) Attribute=(Path)
              modified from
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war) to
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(Deployed) modified from (true) to (true).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(Parent) modified from (petstore:Name=petstore,Type=Domain) to
              (petstore:Type=Domain,Name=petstore).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(LastModified) modified from (0) to (993491862318).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(Application) modified from (null) to
              (petstore:Name=AssetManagement,Type=Application).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(Application) modified from
              (petstore:Name=AssetManagement,Type=Application) to
              (petstore:Name=AssetManagement,Type=Application).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(URI) modified from (null) to (algoam.war).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(ContextPath) modified from (null) to (algoam).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(LoadError) modified from (null) to (null).>
              [att1.html]
              

    Hi all, I am having an issue with deploying a WAR file on WebLogic
              6.1 (SP2). I am using JDK 1.3.1. The error messages I recieve in the
              log are as follows:
              Any help would be much appreciated.
              Thanks, Marko
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(Deployed)
              modified from (true) to (false).>
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(Path) modified
              from (C:\bea\wlserver6.0\config\petstore\applications) to
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war).>
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(LastModified)
              modified from (993490876958) to (993490986115).>
              ####<Jun 25, 2001 1:43:06 PM EDT> <Error> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141004>
              <IOException opening application petstore:Name=algoam,Type=Application,
              loading from path
              C:\bea\wlserver6.0\config\petstore\applications\algoam.war>
              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:110)
              at java.util.jar.JarFile.<init>(JarFile.java:115)
              at java.util.jar.JarFile.<init>(JarFile.java:82)
              at weblogic.utils.jars.VirtualJarFile.<init>(VirtualJarFile.java:24)
              at
              weblogic.management.mbeans.custom.Application.adminLoad(Application.java:257)
              at
              weblogic.management.mbeans.custom.Application.load(Application.java:230)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:562)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:548)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:285)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
              at $Proxy7.load(Unknown Source)
              at
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:462)
              at
              weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:380)
              at
              weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManager.java:152)
              at
              weblogic.management.mbeans.custom.ApplicationManager$ApplicationPoller.run(ApplicationManager.java:643)
              ####<Jun 25, 2001 1:43:06 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <Application Manager Thread> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=Application) Attribute=(LoadError)
              modified from (null) to (java.util.zip.ZipException: error in opening
              zip file).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application) Attribute=(Name)
              modified from (AssetManagement) to (AssetManagement).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application) Attribute=(Path)
              modified from (null) to
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application) Attribute=(Path)
              modified from
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war) to
              (C:\bea\wlserver6.0\config\petstore\applications\algoam.war).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(Deployed) modified from (true) to (true).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(Parent) modified from (petstore:Name=petstore,Type=Domain) to
              (petstore:Type=Domain,Name=petstore).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(LastModified) modified from (0) to (993491862318).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(Application) modified from (null) to
              (petstore:Name=AssetManagement,Type=Application).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(Application) modified from
              (petstore:Name=AssetManagement,Type=Application) to
              (petstore:Name=AssetManagement,Type=Application).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(URI) modified from (null) to (algoam.war).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=algoam,Type=WebAppComponent,Application=AssetManagement)
              Attribute=(ContextPath) modified from (null) to (algoam).>
              ####<Jun 25, 2001 1:57:42 PM EDT> <Info> <Management> <tormmaric>
              <petstoreServer> <ExecuteThread: '0' for queue:
              '__weblogic_admin_html_queue'> <> <> <141039>
              <MBean=(petstore:Name=AssetManagement,Type=Application)
              Attribute=(LoadError) modified from (null) to (null).>
              [att1.html]
              

  • Problems with .ARW files and auto toning

    problems with .ARW files and auto toning
    let me try to explain this because this has happened in past and never found a way to resolve but i lived with it
    now that I have a Sony A7R the problem is more serious
    Firstly i take pride it making the picture happen all in camera, i use DRO lvl 5 to get enough light, like when i'm shooting at dusk. DRO its like doing HDR but in a single file, it lightens the darks. in my camera i'm happy with results
    but when I upload them to lightroom, they come out near black.
    allow me to explain
    lets say I import 100 images
    i double check my preferences and everything is UNCHECKED when it comes to importing options, there is no auto toning, nothing.
    as the images import i see a preview in the thumbnail which looks fine.
    i double click on one to enlarge it, hence leave grid view.
    for a brief 1 or 2 seconds, i see the full image in all its glory but than lightroom does something funny, it darkens the image
    one by one as it inspects each image, if it was a DRO image it makes it too dark.
    to make this clear, the image is perfect as it was in the beginning but after a few seconds lightroom for some reason thinks it needs to correct it.
    how to prevent lightroom from doing this, i want the image exactly as it is, why must lightroom apply a correction>?
    i think it has to do something with interpreting the raw file and lightroom applies its own algorithm.
    but here is what i dont get.....before lightroom makes the change i'm able to witness the picture exactly as it was taken and want it unchanged..
    now i have to tweak each file or find a profile for it which is added work.
    any ideas how to prevent lightroom from ruining my images and just leave them as they were when first detected...
    there are 2 phases...one is when it originally imports and they look fine
    second is scanning each image and applying some kind of toning which darkens it too much.
    thanks for the help

    sorry thats the auto reply message from yahoo email.
    i've disabled it now
    thing is, there is no DRO jpg to download from the camera
    its only ARW. so my understanding is when i use DRO setting, the camera makes changes to the ARW than lightroom somehow reads this from the ARW.
    but then sadly reverts it to no DRO settings.
    because i notice if i take normal picture in raw mode its dark but if i apply dro to it, it comes out brighter, yet when i d/l the image from camera to lightroom, which is an ARW - there are no jpgs. lightroom decides to mess it up
    so in reality there is no point in using DRO because when i upload it lightroom removes it.
    is there a way to tell lightroom to preserve the jpg preview as it first sees it.
    its just lame, picture appears perfect...than lightroom does something, than bam, its ruined,.
    what do i need to do to prevent lightroom from ruining the image? if it was good in the first place.

  • Problems with compressing  files with right hand click. it does not work.

    Problems with compressing files with right hand click.
    I am using the compress function in the Mac OS (File > Compress XX) from time to time. Today it does not work anymore. OS 10.5.6
    I get a message: The content list cannot be created for compressing.
    I tried it with files and folders and keep getting this message. Anybody any idea as to how to fix this

    Thanks I love my macbook!!!!
    I also got further problems such as copy-paste not working etc.
    so I fixed it just this morning by running Applejack 1.5 and am back up running noticing your post.
    thanks for helping though!

  • Problem with Image file

    Hi,
    Iam facing with one problem.I have one swing interface through which I can upload files(back end servlet programme).Now I can upload all types of file but problem with image file it uploading perfectly that means size of the uploaded file is ok but its format damaged.It can not be open.My backend servlet programme is ok coz i tested it with html form it is working perfectly.Problem with swing interface.Plz guide me where I done a mistake.Below r my codes:-
    ImageIcon Upload=new ImageIcon("images/Upload.gif");
         Button=new JButton(Upload);
         Button.setToolTipText("Upload");
    Button.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
              int returnVal = fc.showOpenDialog(ActionDemo4.this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
    String aa=file.getAbsolutePath();
              textArea3.append(aa);
                   textArea2.append("Local URL:");
    long l=file.length();
              try
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff);
              String str1=textArea10.getText();
    url = new URL ("http://127.0.0.1:7001/servletUpload?x="+str1);
         urlConn = url.openConnection();
         urlConn.setDoInput (true);
         urlConn.setDoOutput (true);
         urlConn.setUseCaches (false);
         urlConn.setRequestProperty("Content-Type","multipart/form-data;boundry=-----------------------------7d11e410e500f2");
         printout = new DataOutputStream (urlConn.getOutputStream ());
    String content ="-----------------------------7d11e410e500f2\r\n"+"Content-Disposition: form-data;"+"name=\"upload\"; filename=\""+aa+"\"\r\n"+"Content-Type: application/octet-strem\r\n\r\n\r\n"+conffile+"-----------------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);
    printout.flush ();
    printout.close ();
    Best Regards
    Bikash

    The errors are here:
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff); (conffile is a String object containing the image)
    and here:
    String content ="-----------------------------7d11e410e500f2\r\n"+"Con
    ent-Disposition: form-data;"+"name=\"upload\";
    filename=\""+aa+"\"\r\n"+"Content-Type:
    application/octet-strem\r\n\r\n\r\n"+conffile+"--------
    --------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);conffie is sent to the server but
    it's non possible to treat binary data as String!
    Image files must be sent as byte[] NOT as String ......

  • What is the exact problem with this file?

    Hi all,
    There is an old form , which was not in use from many days.
    Now when we tried to run the form, i got the error saying "FRM-40734:Internal Error:Pl/SQL error occured.", in the login form.
    When i tried to open the fmb file in Oracle Forms Builder 6i, i got the following error:
    FRM-10102: Cannot attach PL/SQL library d2kwutil. This library attachment will be lost if the module is saved., but the fmb file got open.
    The login button has the following code:
    DECLARE
      UNAME VARCHAR2(30);
      --USER_ID PARAMLIST;
      V_USER APUSERMA.USER_NAME%TYPE;
      V_PASSWED APUSERMA.USER_PASSWD%TYPE;
    BEGIN
    select user_CD INTO :GLOBAL.USER_ID from apuserma 
    where user_CD = :TI_USER_NAME AND user_PASSWD = :IT_USER_PASSWD
    AND SYSDATE BETWEEN USER_VALID_FRM AND USER_VALID_TO;
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    :global.compname := :compname;
    compnm(:compname);
    --USER_ID := CREATE_PARAMETER_LIST('USER_id_NAME');
    call_form('Forms\MAIN_SCREEN',hide,DO_REPLACE);
    exception
      when no_data_found then
      MESSAGE('Incorrect Username or Password.  Please Re-Enter');
      message(' ');
      RAISE FORM_TRIGGER_FAILURE;
    END;
    EXIT_FORM;
    When i tried to compile, i got error saying ,
    Error 201 at line 10, column 28
    identifier 'WIN_API_ENVIRONMENT.READ_REGISTRY' must be declared.
    I am not getting to know What is the exact problem with this file?
    Help me with this please.
    Thank You.
    Oracle forms builder 6i.
    Oracle 9i.

    Vijetha wrote:
    I also want to know what is the use of  win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername') ??
    What does it do??
    If i comment the following line , will it be a problem??
    :global.user_id  := substr(win_api_environment.read_registry('HKEY_LOCAL_MACHINE\system\currentcontrolset\control\computername\computername','computername'),1,10);
    Because i commented the above line & compiled, so it is not giving any error now.
    So please tell me what win_api_environment.read_registry does??
    it's read windows registry value. So, no problem if you comment it.
    Thanks

  • Problem with Receiver File adapter

    Hi
    I have a problem with receiver file FTP adapter, while writting file in target folder, connection is failing, after retries, it writting file again. How to avoid this situation, is there any way to write the leftout part in the file.
    VS

    Hi
    Thank u all,  Problem is solved, i changed write mode to Over write existing file. It is working fine.
    VS

  • Has anyone had a problem with TapMedia File Manage on iPhone 5. I reported a WIFI functionality problem to the developer and asked for support. Instead they have been very unprofessional by name calling me instead of logically evaluate and troubleshoot th

    Has anyone had a problem with TapMedia File Manage installed on iPhone 5? I reported a WIFI functionality problem to the developer and asked for support. Instead the company has been very unprofessional by name calling me instead of logically evaluate and troubleshoot the problem

    Hi AKE1919,
    Welcome to the Support Communities!
    The following information should help you with this:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/HT1933?viewlocale=en_US
    Cheers,
    Judy

  • Problem with import file type setting

    Problem with import file type settings - In preferences>general I select "wav encoder" But then going to tools>Create it still says "create mp3 version".
    Can't find a way to overcome this. Thanks for any help.

    Doublechecking, roy. After making the preferences change, are you leaving the General tab by clicking the OK button down the bottom-right-hand corner of the tab?

  • Problem with URL File download

    Hi every one i am facing a problem with URL File read Technique
    import java.awt.Color;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.net.URL;
    import java.net.URLConnection;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    public class JarDownloader
         boolean isSuccess = false;
         public JarDownloader(String url)
              downloadJar(url);          
         public boolean isDownloadingSuccess()
              return isSuccess;
         private File deleteExistingFile(String filename)
              File jarf = new File(filename);
              if(jarf.exists())
                   jarf.delete();
              return jarf;
         public static void main(String args[]){
              new JarDownloader("url/filename.extension");
         private void downloadJar(String url)
              try
                   URL jarurl = new URL(url);
                   URLConnection urlc = jarurl.openConnection();
                   urlc.setUseCaches(false);
                   urlc.setDefaultUseCaches(false);
                   InputStream inst = urlc.getInputStream();
                   int totlength = urlc.getContentLength();
                   System.out.println("Total length "+totlength);
                   // If the size is less than 10 kb that means the linkis wrong
                   if(totlength<=10*1024)throw new Exception("Wrong Link");
                   JFrame jw =new JFrame("Livehelp-Download");
                   JPanel jp =new JPanel();
                   jp.setLayout(null);
                   JLabel jl = new JLabel("Downloading required file(s)...",JLabel.CENTER);
                   jl.setBounds(10,10,200,50);
                   jp.add(jl);
                   JProgressBar jpbar = new JProgressBar(0,totlength);
                   jpbar.setBorderPainted(true);
                   jpbar.setStringPainted(true);
                   jpbar.setBounds(10,70,200,30);
                   jpbar.setBackground(Color.BLUE);
                   jp.add(jpbar);
                   jw.setContentPane(jp);
                   jw.pack();
                   jw.setResizable(false);
                   jw.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
                   jw.setLocationRelativeTo(null);
                   jw.setSize(220,150);
                   jw.setVisible(true);
                   int readlngth=0;
                   int position=0;
                   byte[] readbytes = new byte[totlength];
                   while(totlength-position > 0)
                        readlngth = inst.read(readbytes,position,totlength-position);
                        position+=readlngth;
                        jpbar.setValue(position);
                   File jarf = deleteExistingFile(filename);
                   jarf.createNewFile();
                   //FileWriter fwriter=new FileWriter(jarf,true);
                   FileOutputStream fout = new FileOutputStream(jarf,true);
                   DataOutputStream dout = new DataOutputStream(fout);
                   dout.write(readbytes);
                   dout.flush();
                   dout.close();
                   inst.close();
                   jw.setVisible(false);
                   jw.dispose();
                   isSuccess=true;
              }catch(Exception ex)
                   isSuccess=false;
    }From the above code i received the total length of the PAGE content (i.e here url is a file) when i tried to find the size of that file it return -1.
    please help me

    I think the real problem is that you don't check the return value from read (it's probably less than data.length indicating an incomplete read). Isn't there a readFully somewhere?

  • Problem with .sitx files (Safari but not Firefox???)

    Hi All,
    I have a website online (with help from iWeb and BBEdit) but am having a problem I cant figure out (this IS my first website!)
    I am hoping that someone much more knowledgeable than me can help me with it.
    I basically have a download section. Icons and desktops.
    Now, when I (or anyone else) tries to download- everything seems to be fine in FireFox (even IE!) but not in Safari.
    My desktops are compressed as .zip files. No problems there, everyone can download and open (including Safari users!)
    My icons are compressed as .sitx files. This is where the problems come in. Firefox and IE download them no problem ('save to disk?' etc) However when one attempts to download the icons (.sitx files) with Safari it simply displays pages of gibberish (starting with the word 'Stuffit') which I am presuming is Safari trying to 'display' the contents of the actual stuffit file.
    Why is this? Why wont safari simply download the .sitx files as it does .zip files?
    Does Safari have some sort of inherent problem with .sitx files? Is it some sort of configuration within Safari preferences? or (and probably most likely!) is it something I have done wrong?
    Oh, my website (page in question!) can be found here:
    http://aoimedia.co.uk/news/news.html
    Thanks in advance for all your valuable help
    Kind regards
    John
    12 G4 Powerbook/Superdrive. (she's named Skates!) Mac OS X (10.4.4)

    Hi,
    It sounds like the server the website/file is hosted on is not identifying the type correctly. As you've seen, different browsers will handle this situation differently.
    Have a read of this article:
    http://www.macosxhints.com/article.php?story=20040211102018600
    Hope that helps.

  • Problems with updating files in the cloud

    problems with updating files in the cloud

    What kind of problems?
    Have you recently upgraded to iCloud Drive on your iOS devices with iOS 8?
    Be aware, be careful, be prepared for iCloud Drive | TUAW: Apple news, reviews and how-tos since 2004

  • Error: There is a problem with the file and it cannot be copied

    I've been trying to copy (and essentially move) the contents of an NTFS-formatted external HDD to my iMac's internal HDD so I can then format the external HDD to Mac OS Extended. However, when I simply try to drag and drop, I get an error during the transfer that states:
    There is a problem with the file and it cannot be copied.
    I tried a basic cp command in Terminal to copy all contents of the external HDD to a folder on my iMac's desktop, and found that while there were no errors, there were many individual files missing full chunks of data (ie. original file would be 4GB on my external HDD, but only 350MB on my desktop).
    Any ideas on how I can successfully copy a large amount of data (approx. 170GB) from my external HDD to my internal HDD while avoiding this error, so I can ultimately format my external HDD to Mac OS Extended? ANY help is greatly appreciated.

    That's not a good error to see. It indicates something is very wrong. Pulled out of an old programming header file:
    ioErr = -36, /*I/O error (bummers)*/
    If Apple labelled it "bummers," they had a good reason! Unfortunately, that doesn't bode well for you.
    Try running Disk Utility again. Keep repairing over and over until one of two things happens: 1) Disk Utility says no repair was needed, or 2) Disk Utility reports the same error in two sequential repair sessions and is unable to repair it both times.
    If you hit the second case, or if you hit the first but still can't copy files, then you've got two basic options:
    = Buy a third-party disk utility or two and try them. Try TechTool as a first choice.
    = Recover what files you can and write the rest off as gone.
    = Send your drive to a data recovery service and hope they can extract more than you can.
    Of course, none of this is necessary if you have a backup of the contents of that hard drive. (If you don't, this is your learning experience. Once bitten, twice shy, so they say.) Also, regardless of the outcome, once you've got your data or have decided it's gone, you're going to want to wipe that drive completely clean. Reformat the drive with Disk Utility, then when it's done, select the drive in Disk Utility and hit command-i. (Don't select the new volume you just created on that drive, select the drive itself. Mine looks like "232.9 GB Hitachi ..." with the volume name indented underneath.) Look for an item that says S.M.A.R.T. Status, and if it doesn't say Verified, you might as well throw out the drive. Don't trust any more data to it.
    If all appears safe, you can start moving data back onto it. But, as always, make sure you have a backup of everything!

  • SFTP MGET of large files fails - connection closed - problem with spool file

    I have a new SFTP job to get files from an FTP Server.  The files are large (80mg, 150mg).  I can get smaller files from the ftp site with no issue, but when attempting the larger files the job completes abnormally after 2 min 1 sec. each time.  I can see the file is created on our local file system with 0 bytes, then when the FTP job fails, the 0 byte file is deleted.
    Is there a limit to how large an ftp file can be in Tidal?  How long an ftp job can run?
    The error in the job audit is Problem with spool file for job XXXX_SFTPGet and an exit code of 127 (whatever that is).
    In the log, the error is that the connection was closed.  I have checked with the ftp host and their logs show that we are disconnecting unexpectedly also.
    Below is an excerpt from the log
    DEBUG [SFTPMessage] 6 Feb 2015 14:17:33.055 : Send : Name=SSH_FXP_STAT,Type=17,RequestID=12
    DEBUG [SSH2Channel] 6 Feb 2015 14:17:33.055 : Transmit 44 bytes
    DEBUG [ChannelDataWindow] 6 Feb 2015 14:17:33.055 : Remote window size decreased to 130808
    DEBUG [PlainSocket] 6 Feb 2015 14:17:33.071 : RepeatCallback received 84 bytes
    DEBUG [SSH2Connection] 6 Feb 2015 14:17:33.071 : ProcessPacket pt=SSH_MSG_CHANNEL_DATA
    DEBUG [SFTPMessageFactory] 6 Feb 2015 14:17:33.071 : Received message (type=105,len=37)
    DEBUG [SFTPMessageStore] 6 Feb 2015 14:17:33.071 : AddMessage(12) - added to store
    DEBUG [SFTPMessage] 6 Feb 2015 14:17:33.071 : Reply : Name=SSH_FXP_ATTRS,Type=105,RequestID=12
    DEBUG [SFTPMessage] 6 Feb 2015 14:17:33.071 : Send : Name=SSH_FXP_OPEN,Type=3,RequestID=13
    DEBUG [SSH2Channel] 6 Feb 2015 14:17:33.071 : Transmit 56 bytes
    DEBUG [ChannelDataWindow] 6 Feb 2015 14:17:33.071 : Remote window size decreased to 130752
    DEBUG [PlainSocket] 6 Feb 2015 14:17:33.087 : RepeatCallback received 52 bytes
    DEBUG [SSH2Connection] 6 Feb 2015 14:17:33.087 : ProcessPacket pt=SSH_MSG_CHANNEL_DATA
    DEBUG [SFTPMessageFactory] 6 Feb 2015 14:17:33.087 : Received message (type=102,len=10)
    DEBUG [SFTPMessageStore] 6 Feb 2015 14:17:33.087 : AddMessage(13) - added to store
    DEBUG [SFTPMessage] 6 Feb 2015 14:17:33.087 : Reply : Name=SSH_FXP_HANDLE,Type=102,RequestID=13
    DEBUG [SFTPMessage] 6 Feb 2015 14:17:33.087 : Send : Name=SSH_FXP_READ,Type=5,RequestID=14
    DEBUG [SSH2Channel] 6 Feb 2015 14:17:33.087 : Transmit 26 bytes
    DEBUG [ChannelDataWindow] 6 Feb 2015 14:17:33.087 : Remote window size decreased to 130726
    DEBUG [PlainSocket] 6 Feb 2015 14:17:33.118 : RepeatCallback received 0 bytes
    DEBUG [SFTPChannelReceiver] 6 Feb 2015 14:17:33.118 : Connection closed:  (code=0)
    ERROR [SFTPMessageStore] 6 Feb 2015 14:17:33.118 : Disconnected unexpectedly ( [errorcode=0])
    ERROR [SFTPMessageStore] 6 Feb 2015 14:17:33.118 : EnterpriseDT.Net.Ftp.Ssh.SFTPException:  [errorcode=0]
    ERROR [SFTPMessageStore] 6 Feb 2015 14:17:33.118 :    at EnterpriseDT.Net.Ftp.Ssh.SFTPMessageStore.CheckState()
    ERROR [SFTPMessageStore] 6 Feb 2015 14:17:33.118 :    at EnterpriseDT.Net.Ftp.Ssh.SFTPMessageStore.GetMessage(Int32 requestId)

    I believe there is a limitation on FTP and what you are seeing is a timeout built into the 3rd party application that tidal uses (I feel like it was hardcoded and it would be a big deal to change but this was before Cisco purchased tidal)  there may have been a tagent.ini setting that tweaks that but I can't find any details.
    We wound up purchasing our own FTP software (ipswitch MOVEit Central & DMZ) because we also had the need to host as well as Get/Put to other FTP sites. It now does all our FTP and internal file delivery activity (we use it's api and call from tidal if we need to trigger inside a workflow)

Maybe you are looking for

  • Iphone not recognised by PC or itunes

    Hi i have a 3g iphone which is not being recognised by the HP tablet i use on the ESB cable, it does not show up in itunes either I have itunes 8.0 intsalled, the phone is recignised by other devices and other USB devices are recognised by the usb po

  • Creation of SDEB's instead of Purchase requisitions while running Plant MRP

    Hi Gurus, we noticed that after the weekend run of MRP that the system has produced SDEB''s rather than Purchase requisitions. When we run individual MRP for a part then a purchase requisition is created and if run an MRP total region requisitions ar

  • Combo box in multi level block

    Hi, I am facing one pbm with combo box. I will explain my scenario. Pl help me. In new-form-instance-trigger, opening cursor for fetching item1, item2 from table1; - C1 opening cursor for fetching item3 from table1 based on item1--C2 begin open the l

  • PID control for a sinusoid

    Hello, I have written a program that takes a reference signal, and then uses a proportional control to synthesize a similar signal in a wire coil. I modulate the duty cycle of the counters of a PCI 6224 card. One counter goes to  the positive side  o

  • Accts Payable posting using BAPI

    Hi I am trying to use the Bapi: BAPI_ACC_INVOICE_RECEIPT_POST and am getting an error for "Balance in Transaction Currency. Here is how I am loading the fields, if anyone can see where my error is I would appreciate it. * fill header   gd_documenthea