[JBoss JIRA] Created: (JBPM-775) Business Calendar doesn't add days, weeks, months correctly when daylight savings time begins or ends
by Randy Tielking (JIRA)
Business Calendar doesn't add days, weeks, months correctly when daylight savings time begins or ends
-----------------------------------------------------------------------------------------------------
Key: JBPM-775
URL: http://jira.jboss.com/jira/browse/JBPM-775
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.2
Environment: All environments
Reporter: Randy Tielking
Assigned To: Tom Baeyens
Priority: Minor
When the BusinessCalendar's add method is called with a duration of days, weeks, or months and the time duration will span the beginning or end of daylight savings time, an unexpected time is returned. Typically if a timer should go off at 5:00 pm everyday, you still want it to go off at 5:00 pm before and after you "spring forward" or "fall back".
For example:
public class BusinessCalendarTest extends TestCase {
/**
* Tests that the BusinessCalendar still gets the time right when daylight savings time change occurs
* @throws Exception
*/
public void testCanHandleStartingDaylightSavingsTimeWhenAddingDays ( ) throws Exception {
BusinessCalendar businessCalendar = new BusinessCalendar();
Duration oneDayDuration = new Duration("1 day");
DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z");
df.setTimeZone(TimeZone.getTimeZone("US/Eastern"));
Date startDate = df.parse("2006/04/02 01:55:00 EST"); // Sunday at 1:55 am EST
Date newDate = businessCalendar.add(startDate, oneDayDuration); // now Monday at 1:55 am EDT
assertEquals("2006/04/03 01:55:00 EDT", df.format(newDate));
}
}
This test fails the assert with:
junit.framework.ComparisonFailure: expected:<2006/04/03 0[1]:55:00 EDT> but was:<2006/04/03 0[2]:55:00 EDT>
If you want to run every 24 hours instead of the same time every day, you could use a duration of 24 hours.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months
[JBoss JIRA] Created: (JBPM-776) invalid business calendar properties lead to java.lang.StackOverflowError
by Bernd Ruecker (JIRA)
invalid business calendar properties lead to java.lang.StackOverflowError
-------------------------------------------------------------------------
Key: JBPM-776
URL: http://jira.jboss.com/jira/browse/JBPM-776
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.1
Reporter: Bernd Ruecker
Assigned To: Tom Baeyens
Priority: Minor
if I configure the business calendar like this
weekday.monday= 8:00-12:30 & 13:30-24:00
I do not get any error-message but a exception
Caused by: java.lang.StackOverflowError
at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(BaseCalendar.java:415)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2055)
at java.util.GregorianCalendar.computeFields(GregorianCalendar.java:1970)
at java.util.Calendar.setTimeInMillis(Calendar.java:1066)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:576)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:541)
at org.jbpm.calendar.BusinessCalendar.getCalendar(BusinessCalendar.java:153)
at org.jbpm.calendar.BusinessCalendar.findStartOfNextDay(BusinessCalendar.java:85)
at org.jbpm.calendar.Day.findNextDayPartStart(Day.java:81)
at org.jbpm.calendar.DayPart.add(DayPart.java:91)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
at org.jbpm.calendar.DayPart.add(DayPart.java:95)
Not a big deal, I think. But a quick look in the sources was not enough for me to provide a patch
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months
[JBoss JIRA] Updated: (EJBTHREE-236) EJB3 .ear file and hot deploy of .war file cause java.lang.ClassCastException
by Dimitris Andreadis (JIRA)
[ http://jira.jboss.com/jira/browse/EJBTHREE-236?page=all ]
Dimitris Andreadis updated EJBTHREE-236:
----------------------------------------
Fix Version/s: (was: JBossAS-4.0.3RC2)
> EJB3 .ear file and hot deploy of .war file cause java.lang.ClassCastException
> -----------------------------------------------------------------------------
>
> Key: EJBTHREE-236
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-236
> Project: EJB 3.0
> Issue Type: Bug
> Environment: Linux, 2.6.9 kernel. jdk build 1.5.0-b64. JBoss 4.0.1RC1. EJB Preview 2.
> Reporter: Frank Merenda
> Assigned To: Bill Burke
> Priority: Minor
>
> If I have a EJB 3 SLSB deployed in an .ear file, and I create a separate .war file (not in the ear file) to access that SLSB it works fine upon server startup. If I touch the .ear file everything still works fine. If I touch the .war file, I get a ClassCastException:
> java.lang.ClassCastException: $Proxy76
> at org.jboss.jbossnetwork.pushportal.business.ApplicationFacade.login(ApplicationFacade.java:23)
> at ....
> I am referencing the SLSB from the war file with the following code:
> InitialContext ctx = new InitialContext();
> Login login = (Login) ctx.lookup(LoginRemote.class.getName());
> It is blowing up on the second line.
> This is repeatable 100% of the time. If I restart the app server it works correctly again. If I just re-touch both the .ear and the .war I will still get the CCE.
> I was not sure if this goes into the EJB3 or the JBoss AS project. There were other ClassCastExceptions in the AS project, so I put it in here.
> I've attached the .war and .ear file. You can deploy them in JBoss 4.0.1RC2 with EJB3 set up. (update if no attachment, email me at fmerenda(a)jboss.org and I will send them. I don't see an attach on the bug request). I will try to add it after I file the bug.
> Steps to repeat:
> 1) deploy war and ear files.
> 2) go to http://localhost:8080/jbosspush/login.html
> 3) type in any 4 letters for the username and password. You are sent to the main page.
> 4) touch jboss-4.0.1RC1/server/all/deploy/jbosspush.war. Wait for hot deploy.
> 5) go to http://localhost:8080/jbosspush/login.html
> 6) type in any 4 letters for the username and password. You are sent to placeholder error page. Trace is in the log.
> 7) restart jboss server
> 8) repeat steps 1-3. Everything works.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months
[JBoss JIRA] Updated: (EJBTHREE-638) CLONE -Error using SequenceGenerator annotation: org.hibernate.AnnotationException: Unknown Id.generator
by Dimitris Andreadis (JIRA)
[ http://jira.jboss.com/jira/browse/EJBTHREE-638?page=all ]
Dimitris Andreadis updated EJBTHREE-638:
----------------------------------------
Fix Version/s: EJB 3.0 RC10 - FD
> CLONE -Error using SequenceGenerator annotation: org.hibernate.AnnotationException: Unknown Id.generator
> --------------------------------------------------------------------------------------------------------
>
> Key: EJBTHREE-638
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-638
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: Preview 5
> Environment: Windows XP SP2; J2SE Development Kit 5.0 Update 2; JBoss-4.0.1sp1; Preview 5
> Reporter: Daniel Dyer
> Fix For: EJB 3.0 Beta 1, EJB 3.0 RC10 - FD
>
>
> Using @javax.persistence.SequenceGenerator(
> name="SEQ_STORE",
> sequenceName="my_sequence")
> annotation at class level and referencing it in the @Id annotation of a sequence generated column
> @Id(generate=GeneratorType.SEQUENCE, generator="SEQ_STORE")
> leads to an error during deplpoyment (for error message see below)
> -------------------------------------------
> Source Code from sourceforge testsuite: http://cvs.sourceforge.net/viewcvs.py/hibernate/HibernateExt/metadata/tes...
> //$Id: Store.java,v 1.1 2005/03/05 20:48:15 epbernard Exp $
> package org.hibernate.test.annotations.id;
> import javax.persistence.Entity;
> import javax.persistence.GeneratorType;
> import javax.persistence.Id;
> import java.io.Serializable;
> /**
> * Sample of class generator
> * @author Emmanuel Bernard
> */
> @Entity
> @javax.persistence.SequenceGenerator(
> name="SEQ_STORE",
> sequenceName="my_sequence"
> )
> public class Store implements Serializable {
> private Long id;
>
> @Id(generate=GeneratorType.SEQUENCE, generator="SEQ_STORE")
> public Long getId() {
> return id;
> }
> public void setId(Long long1) {
> id = long1;
> }
> }
> -----------------------
> error message:
>
> 15:06:14,364 ERROR [Ejb3Module] Starting failed jboss.j2ee:service=EJB3,module=tutorial.ejb3
> org.hibernate.AnnotationException: Unknown Id.generator: SEQ_STORE
> at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1113)
> at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:699)
> at org.hibernate.cfg.AnnotationBinder.processElementsOfAClass(AnnotationBinder.java:573)
> at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:436)
> at org.hibernate.cfg.AnnotationConfiguration.addAnnotatedClass(AnnotationConfiguration.java:94)
> at org.hibernate.cfg.AnnotationConfiguration.addAnnotatedClasses(AnnotationConfiguration.java:62)
> at org.jboss.ejb3.entity.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:196)
> at org.jboss.ejb3.Ejb3Module.createHibernateSessionFactory(Ejb3Module.java:256)
> at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:263)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
> at $Proxy0.start(Unknown Source)
> at org.jboss.system.ServiceController.start(ServiceController.java:416)
> at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> at $Proxy16.start(Unknown Source)
> at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:166)
> at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
> at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
> at $Proxy8.deploy(Unknown Source)
> at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
> at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:463)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 8 months