Strange problem with SimpleDateFormat.parse method

I got something strange with this method.
String pattern = "yyyy/MM/dd";
String mydate = "2007/00/10";
SimpleDateFormat formatter = new SimpleDateFormat(pattern);
Date newdate = formatter.parse(mydate);
I get "2006/12/10"
is this correct.

dongyisu wrote:
and there no exception get thrown outYes it does. I ran this:
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateFormatTest
   public static final String DEFAULT_DATE_FORMAT = "yyyy/MM/dd";
   public static void main(String[] args)
      DateFormat formatter = new SimpleDateFormat(DEFAULT_DATE_FORMAT);
      formatter.setLenient(false);
      for (int i = 0; i < args.length; ++i)
         try
            Date date = formatter.parse(args);
System.out.println("input: " + args[i] + " date: " + date);
catch (ParseException e)
System.err.println(args[i] + " is not a valid date");
and got this when I input "2007/00/10":
com.intellij.rt.execution.application.AppMain DateFormatTest 2007/00/10
2007/00/10 is not a valid date
Process finished with exit code 0%

Similar Messages

  • Problem with SimpleDateFormat.parse()

    Hello
    I have a problem with the parse-function in SimpleDateFormat.
    When i try to parse the date Fri Jul 15 17:23:41 2005 with this pattern EEE MMM d HH:mm:ss yyyy i get the exception java.text.ParseException: Unparseable date: "Fri Jul 15 17:23:41 2005".
    This is my code:
    SimpleDateFormat df=new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy");
    try {
      df.parse(strDate);
    } catch (ParseException e) {
      e.printStackTrace();
    }Can someone explain me what i did wrong?
    Thanks
    Matthias

    Since your name is "Matthias" it is possible that your locale is one that does not use the English language. If that is the case then your problem is that "Fri" or "Jul" are not correct abbreviations in your language.
    Easiest way to test this idea is to format a date (such as now) using that SimpleDateFormat object and see what the output looks like.

  • Problems with the dispatchEvent-Methode

    Hallo,
    I have a strange problem with above mentioned methode
    I have a JTextField, and I want that only numeric inputs are
    accepted, so I used a KeyListener -Interface in the following way
    public void keyTyped(KeyEvent e)
    JTextField field =(JTextField)e.getSource();
    char c =e.getKeyChar();
    if(c>57 | c<46 |c==47 &&c >31)
    field.dispatchEvent(e);
    the other methodes keyPressed and keyReleased are implemented in the same way.
    So if I type in now in my JTextField an 'a' or whatsoever
    then the following Exception occurs:
    java.lang.StackOverflowError
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1483)
    at java.awt.EventQueue.setCurrentEventAndMostRecentTime(EventQueue.java:731)
    at java.awt.Component.dispatchEventImpl(Component.java:3448)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    at java.awt.Container.processEvent(Container.java:1566)
    at java.awt.Component.dispatchEventImpl(Component.java:3598)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java:3439)
    at ueberstd.ComputeHours.keyTyped(ComputeHours.java:128)
    at java.awt.Component.processKeyEvent(Component.java:5048)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
    at java.awt.Component.processEvent(Component.java:4902)
    Mmh, and this is not the whole Exception message.
    There are missing a couple of lines.
    But may be one of you knows what my mistake is.
    Thanks advance.

    This is not the best way to validate for numerics. Check out the "Creating a Validated Text Field" section from the Swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation

  • Strange problem with WD component build

    Hi all,
    I have strange problem with building one wd component, which is part of SC. I'm getting few errors which stops me from building component (and transporting to other systems via CMS of course). I'm providing sample of the errors (3 types) and ant error:
    [code]     [wdgen] [Error]   com.gbs.gmob.RequisitionFoCust --> ContextValueAttribute startDate [type]: Type missing (Hint: The type property must be set to a simple type, a built in type or any java native type)
         [wdgen] [Error]   com.gbs.gmob.RequisitionFoCust --> ContextValueAttribute stopDate [type]: Type missing (Hint: The type property must be set to a simple type, a built in type or any java native type)
         [wdgen] [Error]   com.gbs.gmob.SuppMatGroupView --> TextView MATERIAL_GROUP_NAME_editor [text]: Context element and property are not compatible
         [wdgen] [Error]   com.gbs.gmob.SuppMatGroupView --> TextView MATERIAL_GROUP_ID_editor [text]: Context element and property are not compatible
         [wdgen] [Error]   com.gbs.gmob.SupplierCust --> ContextModelNode SuppMatGroup [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
         [wdgen] [Error]   com.gbs.gmob.SupplierCust --> ContextValueAttribute material_group_list [type]: Type missing (Hint: The type property must be set to a simple type, a built in type or any java native type)
         [wdgen] [Warning] com.gbs.gmob.ApprovalRejectView --> TextEdit TextEdit: UIElement does not have a label
         [wdgen] [Info]    Catching throwable null
         [wdgen] [Info]    com.sap.webdynpro.generation.ant.GenerationAntTaskError
         [wdgen]      at com.sap.webdynpro.generation.ant.GenerationAnt.showCheckResult(GenerationAnt.java:153)
         [wdgen]      at com.sap.ide.webdynpro.generation.Generation.check(Generation.java:2050)
         [wdgen]      at com.sap.ide.webdynpro.generation.Generation.generatePersistentComponent(Generation.java:1299)
         [wdgen]      at com.sap.ide.webdynpro.generation.console.GenerationConsole.generate(GenerationConsole.java:175)
         [wdgen]      at com.sap.webdynpro.generation.ant.GenerationAnt.main(GenerationAnt.java:50)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [wdgen]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [wdgen]      at java.lang.reflect.Method.invoke(Method.java:324)
         [wdgen]      at com.sap.webdynpro.generation.ant.WDGenAntTask.execute(WDGenAntTask.java:219)
         [wdgen]      at org.apache.tools.ant.Task.perform(Task.java:341)
         [wdgen]      at org.apache.tools.ant.Target.execute(Target.java:309)
         [wdgen]      at org.apache.tools.ant.Target.performTasks(Target.java:336)
         [wdgen]      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
         [wdgen]      at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:115)
         [wdgen]      at com.sap.tc.buildplugin.AbstractAntBuildAction.execute(AbstractAntBuildAction.java:65)
         [wdgen]      at com.sap.tc.buildplugin.AbstractPlugin.handleBuildStepSequence(AbstractPlugin.java:225)
         [wdgen]      at com.sap.tc.buildplugin.AbstractPlugin.performBuild(AbstractPlugin.java:201)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [wdgen]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [wdgen]      at java.lang.reflect.Method.invoke(Method.java:324)
         [wdgen]      at com.sap.tc.buildtool.PluginCommunicator.maybeInvoke(PluginCommunicator.java:114)
         [wdgen]      at com.sap.tc.buildtool.PluginCommunicatorV2.communicate(PluginCommunicatorV2.java:42)
         [wdgen]      at com.sap.tc.buildtool.PluginHandlerImpl.handlePluginCommunication(PluginHandlerImpl.java:354)
         [wdgen]      at com.sap.tc.buildtool.PluginHandlerImpl.execute(PluginHandlerImpl.java:176)
         [wdgen]      at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:1726)
         [wdgen]      at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:5559)
         [wdgen]      at com.sap.ide.eclipse.component.provider.actions.dcproject.BuildAction.buildDCsForDevConfig(BuildAction.java:307)
         [wdgen]      at com.sap.ide.eclipse.component.provider.actions.dcproject.BuildAction.access$200(BuildAction.java:58)
         [wdgen]      at com.sap.ide.eclipse.component.provider.actions.dcproject.BuildAction$1.run(BuildAction.java:212)
         [wdgen]      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
         [wdgen] ERROR: Unknown exception during generation null (com.sap.webdynpro.generation.ant.GenerationAntTaskError)
         [wdgen] ERROR: Generation failed due to errors (6 seconds)
    Ant runtime 9.234 seconds
    Ant build finished with ERRORS
    [Error]   Generation failed!
    Error: Build stopped due to an error: [Error]   Generation failed!
    [/code]
    Strange is that if I try to rebuild and deploy locally, no errors occurs and I can normally deploy and run application manually!
    Does anyone have experience with this problem?
    Thanks in advance!
    Regards,
    Ivan

    Hi Ivan
    I have faced this problem earlier BUT ultimately I have to create the DC from scratch.
    But you can check these things:
    1.Have you copy/pasted Dictionary type from other location (check the path of the dictionary types ) --> If yes then deleted that and create again(do not use copy/paste)
    2.This also happens if your "Used DC" has some problems in the JDI --> Remove the used DC and add it again.
    3.Make sure the NWDI infastructure is perfect- this may be a cause.
    4. Check Context mappings --> delete all mappings > save metadata > Create again.
    5. Delete the model and recreate it again.
    6.If you have done reimporting model make sure to restart J2EE instance.
    Hope this solves the problem - if not please post
    Regards
    Ananda

  • Strange Problem with a Vector wraped inside a Hashtable

    Hi all ,
    I'm having a strange problem with a Vector wraped within a Hashtable inherited Class.
    My goal is to keep the order of the elements of the Hashtable so what I did was to extend Hashtable and wrap a Vector Inside of it.
    Here is what it looks like :
    package somepackage.util;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.Vector;
    public class OrderedHashTable extends Hashtable {
        private Vector index;
        /** Creates a new instance of OrderedHashTable */
        public OrderedHashTable() {      
            this.index = new Vector();
    //adds a key pair value to the HashTable and adds the key at the end of the index Vector
       public synchronized Object put(Object key,Object value){      
           index.addElement(key);
           Object obj = super.put(key,value);
           System.out.println("inside OrderedHashTable Put method index size = " + index.size());
           return obj;    
    public synchronized Object remove(Object key){
           int indx = index.indexOf(key);
           index.removeElementAt(indx);
           Object obj = super.remove(key);
           return obj;
    public synchronized Enumeration getOrderedEnumeration(){
           return index.elements();
    public synchronized Object getByIndex(int indexValue){
           Object obj1 = index.elementAt(indexValue);
           Object obj2 = super.get(obj1);      
           return obj2;
       public synchronized int indexOf(Object key){
        return index.indexOf(key);
        public synchronized int getIndexSize() {
            return index.size();
        }Everything seemed to work fine util I tried to add objects using a "for" loop such as this one :
    private synchronized void testOrderedHashTable(){
            OrderedHashTable test = new OrderedHashTable();
            for (int i = 1 ; i<15; i++){
                 System.out.println("adding Object No " + i);
                 String s = new String("string number = "+i);
                 test.put(new Integer(i),s);
                 System.out.println("-----------------------------------");
            //try to list the objects
            Enumeration e = test.getOrderedEnumeration();
            while (e.hasMoreElements()){
                Integer intObj = (Integer) e.nextElement();
                System.out.println("nextObject Number = "+ intObj);
        }Here is the console output :
    Generic/JSR179: adding Object No 1
    Generic/JSR179: inside OrderedHashTable Put method index size = 1
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 2
    Generic/JSR179: inside OrderedHashTable Put method index size = 2
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 3
    Generic/JSR179: inside OrderedHashTable Put method index size = 3
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 4
    Generic/JSR179: inside OrderedHashTable Put method index size = 4
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 5
    Generic/JSR179: inside OrderedHashTable Put method index size = 5
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 6
    Generic/JSR179: inside OrderedHashTable Put method index size = 6
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 7
    Generic/JSR179: inside OrderedHashTable Put method index size = 7
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 8
    Generic/JSR179: inside OrderedHashTable Put method index size = 8
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 9
    Generic/JSR179: inside OrderedHashTable Put method index size = 10
    Generic/JSR179: inside OrderedHashTable Put method index size = 10
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 10
    Generic/JSR179: inside OrderedHashTable Put method index size = 11
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 11
    Generic/JSR179: inside OrderedHashTable Put method index size = 12
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 12
    Generic/JSR179: inside OrderedHashTable Put method index size = 13
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 13
    Generic/JSR179: inside OrderedHashTable Put method index size = 14
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 14
    Generic/JSR179: inside OrderedHashTable Put method index size = 15
    Generic/JSR179: -----------------------------------
    Generic/JSR179: nextObject Number = 1
    Generic/JSR179: nextObject Number = 2
    Generic/JSR179: nextObject Number = 3
    Generic/JSR179: nextObject Number = 4
    Generic/JSR179: nextObject Number = 5
    Generic/JSR179: nextObject Number = 6
    Generic/JSR179: nextObject Number = 7
    Generic/JSR179: nextObject Number = 8
    Generic/JSR179: nextObject Number = 9
    Generic/JSR179: nextObject Number = 9
    Generic/JSR179: nextObject Number = 10
    Generic/JSR179: nextObject Number = 11
    Generic/JSR179: nextObject Number = 12
    Generic/JSR179: nextObject Number = 13
    Generic/JSR179: nextObject Number = 14
    You can notice that the output seems correct until the insertion of object 9.
    At this point the vector size should be 9 and the output says it is 10 elements long ...
    In the final check you can notice the 9 was inserted twice ...
    I think the problem has something to do with the automatic resizing of the vector but I'm not really sure. Mybe the resizing is done in a separate thread and the new insertion occurs before the vector is resized ... this is my best guess ...
    I also tested this in a pure J2SE evironment and I don't have the same strange behavior
    Can anybody tell me what I am doing wrong or how I could avoid this problem ?
    Thanks a lot !
    Cheers Alex

    Am i doing anything wrong?Uhm, yes. Read the API doc for addElement() and for addAll()

  • Strange problem with connection to Integrator Server

    Hi,
    I have a strange problem with making a connection to my Integrator Server.
    I have one workspace folder that I share between Integrator version 2.4 and 3.0 (I have several versions installed for testing purposes)
    When I try to create a new Integrator Server Project in Integrator Designer I get this nice 'Connect to CloverETL Server' panel.
    By default: the connection URL is http://localhost:8080/clover. So by default Integrator Designer wants to connect to my 2.4 Integrator Server.
    When I change this to http://localhost:8301/clover by using the drop-down box and fill in my credentials everything is looking fine. I click Next.
    The problem now is that every time I switch to the next or previous configuration windows the connection is reset to the default http://localhost:8080/clover.
    So it seems like Integrator Designer resets the CloverETL Server URL each time I switch to a different configuration window by using NEXT or BACK.
    The problem occurs in both versions of Integrator Designer.
    Does anybody know that the problem is? Can I change the default URL to my 3.0 Integrator Server?
    Greetings,
    Marcow
    Edited by: Marco Snels (AortaBI)(NL) on 31-mei-2013 4:59

    I'm using iPlanet App server as well and experiencing similar problem. I load my SQL Server driver by Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"), then use DriverManager.getDriver() to obtain the Driver.
    However, the Driver returned is not the SQLServerDriver as expected. The Driver returned is com.netscape.server.jdbc.Driver! And then when I do Driver.getConnection("jdbc:microsoft:sqlserver://MyServer"), it throws an SQLException saying that it doesn't accept a jdbc:microsoft:sqlserver subprotocol. Well, of course it doesn't, it's not a microsoft Driver at all.
    I suspect the problem is that the netscape Driver's acceptsURL() method ALWAYS returns true in iPlanet app server, thus when you getDriver(), the netscape Driver is always returned (and always returned as the first one since it's default?). Thus even though the same piece of code works fine as a standalone application, it just doesn't work on iPlanet app server.
    My work around is:
    Class.forName("my.Driver");
    Enumeration enu = DriverManager.getDrivers();
    Driver useThis = null;
    while (enu.hasMoreElements()) {
    Driver d = (Driver)enu.nextElement();
    if (d.getClass().toString().indexOf("my.Driver") > -1) {
    useThis = d;
    Mind that my above code does not have an performance issue. If you look into the source code of how DriverManager get a Driver for a particular URL, it also loads the whole set of available Drivers, then call acceptsURL() method on each of them to find the first "suitable" one. Thus time complexity is the same.
    I know this is not a very elegant solution and it defeats the purpose of having a DriverManager. Does any one else has a better way to solve this problem, like a way to specify the priority of each Driver so that SQLServerDriver is returned before the netscape Driver?
    Thanks a lot.

  • Strange problem with HD

    I'm having a strange problem with my titanium 15" Powerbook G4 (I believe it's 867Mhz). When I start it up, I get a flashing question mark/folder, and I can't boot into safe mode or make it start up past that question mark.
    Here's the really weird part-- the hard drive is completely fine. I booted it in target mode, was able to access all files on it, transfer files to and from it, and when I ran disk utility, everything was fine.
    I heard disk utility doesn't catch everything, so I ran fsck 3 or 4 times with both the -f and -r options (to rebuild the file catalog), and it came up with 0 errors.
    I think it's just not recognizing the hard drive as the boot volume, but when I press option on startup to select it, it doesn't pop up in the list-- so there's no way to select it.
    Any suggestions?
    Thanks!
    Tim

    I reinstalled Leopard on it using the target disk method (because the DVD drive is broken on the computer). It installed fine, and I can see all system files on it, but I can't boot off of it-- same problem. Thanks for the suggestion... any others?
    Tim

  • Strange problem with JComboBox

    I am having a strange problem with JComboBox, I created a method as a JComboBox factory which returns a JComboBox filled with items. the method works fine and I can see the items in the JComboBox. The problem is when I try using the method myCombo.SelectedItem(String item); the object myCombo does not set the selected item, it just leaves the item blank (or unselected).
    //This method build a JComboBox
    public javax.swing.JComboBox makeJComboBox(String[] items) {
    javax.swing.JComboBox myComboBox = new javax.swing.JComboBox();
    for (int index=0;index<items.length;index++){
    myComboBox.addItem(makeObj(items[index]));
    return myComboBox;
    public Object makeObj(final String item) {
    return new Object() {
    public String toString() {
    return item;
    }

    Couple of better ways to populate a combo with items-
    public javax.swing.JComboBox makeJComboBox(String[]items) {
    javax.swing.ComboBoxModel cbModel = new DefaultComboBoxModel(items);
    javax.swing.JComboBox myComboBox = new javax.swing.JComboBox(cbModel);
    return myComboBox;
    }OR
    public javax.swing.JComboBox makeJComboBox(String[]items) {
    return new javax.swing.JComboBox(items);

  • Strange Problem with tableView:didSelectRowAtIndexPath:

    Hi,
    I have a strange problem with selecting rows in a table view (iPhone OS 3.0):
    I select a row in the table view and the method tableView:didSelectRowAtIndexPath: doesn't get called. After that I select another row in the same table view and the method gets called, but with the indexPath of the first selected row. When I select a third cell in the table the method tableView:didSelectRowAtIndexPath: gets called with the Index Path of the second selected row and so on
    When I click on the same row for example n times in succession, tableView:didSelectRowAtIndexPath: doesn't get called, but when I select another row the method gets called n times with the index path of the first row.
    I'm using different table views in my app and in only one of them I have this problem. Unfortunately I have no clue whats the cause for that behavior. (the problematic table view is created and used like the other ones).
    I hope anybody has a hint for me.
    Thanks,
    Thomas

    Hi,
    since I didn't found a reason for the problem I recreated the ViewController class with the table view from scratch and the problem disappeared ...

  • Strange problem with DatagramSocket and DatagramPacket.

    Hi!
    I got a strange problem with UDP sockets:
    Client (hardware device) send binary data messages, consisting of bytes and shorts fields (8 and 16 bits). But when I tried to read byte array, received from socket, I got some type anomaly. For example:
    byte[] buffer = new byte[1024];
    DatagramPacket packet = new DatagramPacket(buffer, 1024);
    socket.receive(packet);
    byte[] data = packet.getData();
    System.out.println("Received data:");
    for (int i = 0; i < packet.getLength(); i++) {
      System.out.printf("%h:", data);
    I got such thing: 34:4:fffffff1:ffffffdb:ffffffdc:20:1:1:0:2:50
    If I try to parse it using ByteArrayInputStream and DataInputStream
    ByteArrayInputStream is = new ByteArrayInputStream(packet.getData());
    DataInputStream dis = new DataInputStream(is);
    int head = dis.readByte();
    int recvinfo = dis.readByte();
    short count = (short)dis.readShort();
    System.err.printf("Decoded:\n head: %h\n recvinfo: %h\n count: %h\n",
         head, recvinfo, count);i got following:
    Decoded:
    head: 34
    recvinfo: 4
    count: fffff1db
    So I get Integer entries in byte?! array. I also got Integer even I try to read and cast it as short in short!!! variable.
    Please help!
    P.S. Sorry for my bad English.

    Rather fortunate that it auto-casts(or rather, that 0xFF is int by default, rather than attempting any type-detection as most languages do), as otherwise the brackets would have been in the wrong place. If it was still a byte after the "& 0xFF", sign extension would still occur.
    For the sake of the less bit-literate reading this thread, it should be explained that the reason for this was large bytes being interpreted as negative numbers, which translate to negative int, which in hexa become very large ints. That's about as verbose as I can be about this without writing the equivalent of a wikipedia entry about 2s complement.

  • Strange Problem With Extra Spaces

    Hello,
    My development staff is experiencing a very strange problem with our JSP pages which display the values from a JDBC result set. We have two environments here: development and production. We have been creating pages in development which work out fine in our development environment. But when we move the page into production, each value which results from the ResultSet getString() method is having multiple blank spaces appended to the end of the value. So, for example, a 5 digit zip code field is really showing up with a length of 8 or 9 because there are extra spaces added to the end of the value.
    We are able to work around this problem by using the trim() method, but this is getting quite tedious to do to every single page in the site. It is very annoying because the problem does not exist in the development environment.
    So you figure there must be a difference in our development and production environments. But there really isn't. Here is the details for both environments:
    OS: Windows NT 4.0
    Web Server: Apache with Tomcat setup as a plugin
    Database: Sybase ASA 6.0.3
    JDK: 1.3
    Apache and Tomcat were installed from the same download on both servers. Sybase was installed from the same CD on both servers - and the JDBC Driver (SybDriver) was copied from one server to the next.
    Sorry for the long explanation - but does anyone have any idea what could be occurring? Why are the extra spaces being appended to the production pages and not the development pages?
    As always, thanks in advance for any suggestions!
    -- Chris

    Hello Paul,
    Thank you for taking the time to analyze this case.
    The data in the system comes from two different sources. The first source is a nightly feed from a legacy system. The second source is user input via the JSP application. The records that were inserted from the nightly feed have an accurate length() value (meaning there is no untrimmed spaces trailing along.) But the values coming in from the application have extra spaces appended to them. In the development environment, however, both sources provide properly trimmed data.
    If I enter an 8 character last name into the web form in the production app, the value which ends up in the database upon submission will have 2 to 3 extra spaces. I know that this sounds strange - and believe me, it is boggling everyone here. I suspect this problem has to do with the Tomcat installation - even though it was installed identically in each server.
    I think we are just going to have live with using the trim() for every database submission. As always, thank you for the help, and all ideas are always welcome.
    -- Chris

  • Strange Problem with InKeyset filter

    I encountered a strange problem with inkeyset filter.I am trying to do some operations on the the selected set of keys within a cache. I have posted the psuedo code below
    InKeySetFilter inKeySet=new InKeySetFilter(AlwaysFilter.INSTANCE,orgDestFlightSubset);
    // Set of Keys for NamedCacheInstance
    inKeySet.ensureConverted
    (NamedCacheInstance.getCacheService().getBackingMapManager().getContext().getKeyToInternalConverter());
    Extra code to be Added
    System.out.println(NamedCacheInstance.entrySet(inKeySet).size());
    Always prints 0 eventhoug the keys are present in cache. If i add the following code
    NamedCacheInstance.get(orgDestFlightSubset.toArray()[0]) above printing it gives 1 as a result.
    I am sure that object is in cache becoz cache.get() does not call the DB again
    Can anyone tell me what could be the possible problem?

    Hi,
    user10866091 wrote:
    I encountered a strange problem with inkeyset filter.I am trying to do some operations on the the selected set of keys within a cache. I have posted the psuedo code below
    InKeySetFilter inKeySet=new InKeySetFilter(AlwaysFilter.INSTANCE,orgDestFlightSubset);The orgDestFlightSubset must contain keys in Java format which are existing cache keys.
    user10866091 wrote:
    // Set of Keys for NamedCacheInstance
    inKeySet.ensureConverted
    (NamedCacheInstance.getCacheService().getBackingMapManager().getContext().getKeyToInternalConverter());I assume NamedCacheInstance is a NamedCache instance obtained from CacheFactory.
    In this case you should not call the ensureConverted method. This is called by Coherence on the storage nodes upon deserializing of the filter.
    Try these changes.
    Best regards,
    Robert

  • Strange Problems With Display and Permissions Since 10.5.1 update.

    Since I've done the 10.5.1 update I have been having a strange problem with my desktop and dock displays. On my desktop I have these strange lines that appear any time I log in or open any application, the lines never go away and change locations on the screen once I open an application or move a window. My dock has the reflective shelf for about half of it, the rest is a dull grey. I've also had problems with verifying and repairing my permissions. I can never actually complete either permissions task. I've used some third party apps, they always fail as well. The only time I can actually repair my permissions is by booting in to single user mode and doing a fsck -f command. When I boot back in to Leopard and try to use the Disk Utility to repair, it continues to fail.
    I'm not sure if the video problem I am having stems from a permissions issue or possibly a corrupt video driver. Either way, I've done a lot research and haven't found anyone with the same problems I have been having so I thought I would give these forums a shot.
    I am using a PowerMac G4 Quicksilver with dual 800Mhz, 1.5gb RAM, and a GeForce4 Ti 4600 128mb video card.
    Here is a screen shot of the line and dock problem.
    Here is a screen shot of my "About This Mac.
    If anyone could lend some light on this issue, I would greatly appreciate it.
    Thanks
    Jeff

    you can pile it on this: http://discussions.apple.com/thread.jspa?threadID=1246649&tstart=0
    btw - no solution yet.

  • Strange problem with Adobe Acrobat X (crash without a trace)

    Hi,
    I have a strange problem with Adobe Acrobat. It happens totally randomly, it leaves no signs in system logs.
    What is happening: during my work Adobe Acrobat sudennly crashes. After a crash I cannot run it again - system seems to do something for a second, but then nothing happends. When i look into taks manager - there are no processes of Acrobat.exe. It just doesn't want to run. What I need to do is to reinstall whole Adobe Acrobat - which requires restart.
    I've already tried to restart system after crash, it doesn't help - reinstall is required.
    Sometimes everyting is fine for a 3 months, sometimes crash happens a week after the previous one. It also happens in very different situations (somtimes  while opening a file, sometimes when doing something simple, sometimes in more complex tasks).
    Has anyone encountered a similar problem?
    Acrobat version: 10.1.1
    System info: Windows 7 64 bit

    Hi Kelvin,
    Please let me know what OS version you are using.
    The error also shows OS requirements not met.
    Futher please try the steps below :
    > Enable the hidden Admin Account on Windows 7 ( Ref :  http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-wi ndows-vista/ )
    > Disable all Non-Microsoft Startup Services. (Ref : http://helpx.adobe.com/x-productkb/global/disable-startup-items-services-windows.html )
    > Disable all the Antivirus softwares like CA, Norton,Mc Afee etc. temporarily from the computer.
    Reboot and try installing in the new enabled Admin user account and check.
    Please refer the Kb Doc : http://helpx.adobe.com/creative-suite/kb/error-exit-6-exit-7.html.
    Also see Troubleshoot with install logs | CS5, CS5.5, CS6 - http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html for information on how to review your installation logs
    Regards,
    Rave

  • Strange problem with Subviews on 1.0 Beta

    Hi,
    I'm having a strange problem with SubViews on 1.0 Beta. I'm not sure If I'm being stupid and have done something wrong, or if there's a problem here.
    My application is directly based on one of the examples, so the structure etc is almost identical. I've simplified the files below to avoid confusing the issue.
    The default landing page (greeting.jsp) looks like this:
    <%@ taglib declarations for HTML and CORE taglibs %>
    <HTML>
    <HEAD><title>Insulation Layer Demo</title></HEAD>
    <body bgcolor="white">
    <f:view>
    <jsp:include page="sysstatus.jsp" />
    <!-- other strictly HTML content -->
    </f:view>
    </body>
    </HTML>
    sysstatus.jsp looks like this:
    <%@ taglib declarations for HTML and CORE taglibs %>
    <f:subview id="SystemStatusView">
    <h:form id="systemStatusForm">
    <p><h:selectboolean_checkbox id="System1Available" value="#{SystemStatus.system1Available}"/>System 1<br/>
    <h:selectboolean_checkbox id="System2Available" value="#{SystemStatus.system2Available}"/>System 2</p>
    <p><h:command_button id="submit" action="success" value="submit" /></p>
    </h:form>
    </f:subview>When I view this page, the checkboxes all seem to work okay (in that their state is preserved across calls etc), but the formatting is very screwy. The resulting page looks something like:
    <chkbox1> <chkbox2> <Submit>
    System 1
    System 2
    <Other HTML content from greeting.jsp>When I look at the HTML source code being generated, it is genuinly being generated as above, that is, all the form tags first, and then the rest of the content. Interestinly, I tried adding a ${SystemStatus.system2Available} into the body text, and it was rendered as literal text (i.e. not evaluated as EL), which is very curious -- makes me wonder if the included file is included as text, rather than JSP, although the custom taglibs and <f:form> tags etc are not in the generated HTML.
    If I lift all the content between the <h:form> tags (inclusive) out of sysstatus.jsp and put it in greeting.jsp in place of the <jsp:include> tag, all is well.
    Any ideas? All help gratefully recieved!
    Thanks,
    Paul

    Personally, I think it is a bug in the rendering model of JSF itself because if you include any non-JSF tags, they don't get rendered according to my understanding of the what the spec says (in the location the tags are written).
    The only workaround that I could come up with is to use straight JSF tags in all of your layers. Things are then rendered the way that they "should" be rendered.
    You could try wrapping all of your HTML tags in <f:verbatim> tags and see if that helps.
    Good luck!
    David

Maybe you are looking for

  • Is there any way of getting iChat without creating a new account?

    I have recently bought a macbook pro and are having difficulties with setting up an iChat account. When I go add an account it gives me options of AIM, me.com, mac.com, google or yahoo however i do not have any of those accounts. Is there a way of se

  • The specified user or domain group was not found.

    I've got(or rather had) a single sharepoint FE that runs off a separate SQL backend server. I have separate Intranet, MySite, and Search web applications. Last night all three were working perfectly, and everything seemed fine. I came in this morning

  • IMac mid 2007 as display?

    Hi! Heard that only iMac's 2009+ work as monitors. Is there any way around this? I have an old iMac 20" mid '07 that I'd love to use as a display. Kindly, Joachim

  • Microsoft Office when using OS X 10.7 or higher??

    Are there any apps that work well so I can work from home using Microsoft office from my work?

  • Airport/Airplay - Airplay works on iphone, not itunes?

    Hi everyone I've got a strange problem here. I have an old airport express (802.11g, 6.3) which is wired by ethernet to my livebox wireless router. I can stream by airplay mp3s from my iphone in the ipod app with no problems at all! but through iTune