java.text.ParseException:无法解析的日期:" IST"

时间:2015-07-05 10:58:02

标签: java parsing date selenium selenium-webdriver

我收到了java.text.ParseException:Unparseable date:" IST"我尝试将String对象转换为Date对象时的异常。我试图在论坛上找到解决方案,但那些没有帮助。

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="persistenceUnitName" value="mytest" />
        <property name="dataSource" ref="myDataSource" />
        <property name="jpaVendorAdapter">
            <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                <property name="showSql" value="true" />
                <property name="database" value="ORACLE" />
            </bean>
        </property>
        <property name="jpaPropertyMap">
            <map>
<entry key="hibernate.format_sql" value="false" />
                <entry key="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
                <entry key="hibernate.jdbc.fetch_size" value="0" />
                <entry key="hibernate.jdbc.batch_size" value="0" />
                <entry key="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy" />
            </map>
        </property>
    </bean>
    <tx:annotation-driven transaction-manager="transactionManager"/>
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="entityManagerFactory" />
        <qualifier value="mytest"/>
    </bean>

1 个答案:

答案 0 :(得分:2)

actualDate = token.nextToken()中存储的字符串是'IST',它不代表日期。检查您已标记为要查看的字符串源,可能不是令牌流中的后续日期。