[JBoss Tools] - Error setting a Date type parameter
by Carlos Celis Osorio
Carlos Celis Osorio [http://community.jboss.org/people/cacelis] created the discussion
"Error setting a Date type parameter"
To view the discussion, visit: http://community.jboss.org/message/620639#620639
--------------------------------------------------------------
Hi there.
I am trying to set a Date type parameter to a report through the next code:
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:birt="http://www.eclipse.org/birt/taglibs/birt.tld"
xmlns:b="http://jboss.com/products/seam/birt">
<ui:composition template="/layout/template.xhtml">
<ui:define name="body">
<h:form id="homeForm">
<rich:panel id="panel_config_report">
<f:facet name="header">
<h:outputText value="Reportes - Distribución" />
</f:facet>
<table align="center">
<tr align="center">
<td><h:outputLabel value="Fecha Inicio:" /></td>
<td>
<rich:calendar id="fecha_inicio" datePattern="yyyy/MM/dd"
locale="CO" popup="true" enableManualInput="false"
value="#{report.report.fechaInicio}" />
</td>
<td><h:outputLabel value="Fecha Fin:" /></td>
<td>
<rich:calendar id="fecha_fin" datePattern="yyyy/MM/dd"
locale="CO" popup="true" enableManualInput="false"
value="#{report.report.fechaFin}" />
</td>
<td><h:outputLabel value="Zona:" /></td>
<td>
<h:selectOneMenu id="zona" value="#{report.report.zona}">
<s:selectItems value="#{tblDistribucionUsuariosMovilList.resultList}"
var="user" itemValue="#{user.usuario}" label="#{user.usuario}"
noSelectionLabel="---SELECCIONE---" />
</h:selectOneMenu>
</td>
<td><h:outputLabel value="Tipo Reporte:" /></td>
<td>
<h:selectOneMenu id="tipo_reporte" value="#{report.report.tipoEnvio}">
<s:selectItems value="#{tblValorMaestroList.resultList}"
var="master" itemValue="#{master.nombre}" label="#{master.descripcion}"
noSelectionLabel="---SELECCIONE---" />
</h:selectOneMenu>
</td>
</tr>
<tr>
<td colspan="8" align="center">
<h:commandButton action="#{report.generateReport()}" value="Generate" />
</td>
</tr>
</table>
</rich:panel>
<rich:panel id="report" rendered="#{report.report.fechaFin != null and report.report.fechaInicio != null and report.report.zona != null and report.report.tipoEnvio != null}">
<f:facet name="header">
<h:outputText value="Report BIRT" />
</f:facet>
<b:birt embeddable="true" designName="distribution/design/reporteSinDetalle.rptdesign">
<b:param name="FechaInicio" value="#{report.report.fechaInicio != null ? report.report.fechaInicio : '0'}" />
<b:param name="FechaFin" value="#{report.report.fechaFin != null ? report.report.fechaFin : '0'}" />
<b:param name="Zona" value="#{report.report.zona != null ? report.report.zona : ''}" />
<b:param name="TipoReporte" value="#{report.report.tipoEnvio != null ? report.report.tipoEnvio : ''}" />
</b:birt>
</rich:panel>
</h:form>
</ui:define>
</ui:composition>
</html>
Dates values arrive to class ReporteBackingBean.java (its nickname is "report") but, when they arrive to the report, shows the next error in the console:
GRAVE [org.jboss.tools.birt] the value of parameter FechaInicio is invalid: org.eclipse.birt.core.exception.CoreException: Can not convert the value of Mon Aug 01 00:00:00 COT 2011 to Date type.
The ReporteBackingBean.java class has a method that starts a conversation and other that finishes it. Also, It has an object of the Report.java class.
The code of the Reporte.java class is the next:
@Entity
public class Report {
private Date fechaInicio;
private Date fechaFin;
private String zona;
private String tipoEnvio;
/**
* @return the fechaInicio
*/
public Date getFechaInicio() {
return fechaInicio;
}
/**
* @param fechaInicio the fechaInicio to set
*/
public void setFechaInicio(Date fechaInicio) {
this.fechaInicio = fechaInicio;
}
/**
* @return the fechaFin
*/
public Date getFechaFin() {
return fechaFin;
}
/**
* @param fechaFin the fechaFin to set
*/
public void setFechaFin(Date fechaFin) {
this.fechaFin = fechaFin;
}
/**
* @return the zona
*/
public String getZona() {
return zona;
}
/**
* @param zona the zona to set
*/
public void setZona(String zona) {
this.zona = zona;
}
/**
* @return the tipoEnvio
*/
public String getTipoEnvio() {
return tipoEnvio;
}
/**
* @param tipoEnvio the tipoEnvio to set
*/
public void setTipoEnvio(String tipoEnvio) {
this.tipoEnvio = tipoEnvio;
}
}
Can you help me?
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/620639#620639]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss Tools] - Re: JBT 3.1M1, VPE and Eclipse 3.5 Cocoa build on MacOSX
by Yves Dufour
Yves Dufour [http://community.jboss.org/people/kadoudal] created the discussion
"Re: JBT 3.1M1, VPE and Eclipse 3.5 Cocoa build on MacOSX"
To view the discussion, visit: http://community.jboss.org/message/620434#620434
--------------------------------------------------------------
Got error in Eclipse- OSX Lion ( 10.7 ), Java SE 6 version 1.6.0_26, Eclipse Indigo , JBoss AS 7
Could not open the Visual Page Editor:
Current platform 'cocoa.macosx.x86_64' is not supported.
--
org.jboss.tools.vpe.xulrunner.XulRunnerException: Current platform 'cocoa.macosx.x86_64' is not supported.
at org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser.getXulRunnerPath(XulRunnerBrowser.java:227)
at org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser.<init>(XulRunnerBrowser.java:114)
at org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor.<init>(XulRunnerEditor.java:128)
at org.jboss.tools.vpe.editor.mozilla.XulRunnerEditor2.<init>(XulRunnerEditor2.java:23)
at org.jboss.tools.vpe.editor.mozilla.MozillaEditor.createPartControl(MozillaEditor.java:602)
at org.jboss.tools.vpe.editor.VpeEditorPart.createVisualEditor(VpeEditorPart.java:806)
at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.pageChange(JSPMultiPageEditor.java:257)
at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.createPages(JSPMultiPageEditor.java:466)
at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart.createPartControl(JSPMultiPageEditorPart.java:189)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4125)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3971)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
h2.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/620434#620434]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - Problem configuring hibernate.cfg.xml to point to datasource located under jbpm-gwt-console-server.war>WEB-INF>classes
by satish polasi
satish polasi [http://community.jboss.org/people/satishpolasi] created the discussion
"Problem configuring hibernate.cfg.xml to point to datasource located under jbpm-gwt-console-server.war>WEB-INF>classes"
To view the discussion, visit: http://community.jboss.org/message/620485#620485
--------------------------------------------------------------
Hi community,
My requirement is not to have password as clear text in hibernate.cfg.xml and persistence.xml file located in jbpm-human-task.jar so I modified the hibernate.cfg.xml to point to datasource. Can anyone please help how to over come this problem.
*My hibernate.cfg.xml is*
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
" http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
* <property name="connection.datasource">java:workflow-Datasource</property> // This is my datasource i am using to connect to oracle database*
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="show_sql">false</property>
<mapping resource="AuditLog.hbm.xml"/>
</session-factory>
</hibernate-configuration>
I am able to login to jbpm-console but on task creation i am getting the following exception
*16:41:45,747 ERROR [JDBCTransaction] JDBC commit failed*
*java.sql.SQLException: You cannot commit during a managed transaction!*
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:660)
at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:487)
at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170)
*16:41:45,751 INFO [STDOUT] 16:41:45,749 ERROR [SingleSessionCommandService] Could not commit session*
*org.hibernate.TransactionException: JDBC commit failed*
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:161)
at org.jbpm.process.audit.WorkingMemoryDbLogger.addProcessLog(WorkingMemoryDbLogger.java:68)
at org.jbpm.process.audit.WorkingMemoryDbLogger.logEventCreated(WorkingMemoryDbLogger.java:44)
*Caused by: java.sql.SQLException: You cannot commit during a managed transaction!*
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:660)
at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:487)
at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:146)
I have attached the complete server log.
Thanks,
Satish.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/620485#620485]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months