[JCA] - Classcast Exception using Oracle Blobs(10g) and JBoss 4.0
by satwika C
satwika C [http://community.jboss.org/people/satwika.chandra] created the discussion
"Classcast Exception using Oracle Blobs(10g) and JBoss 4.0"
To view the discussion, visit: http://community.jboss.org/message/563449#563449
--------------------------------------------------------------
Hi all,
Im using oracle 10g and JBoss 4.
Im getting the following error :
java.lang.ClassCastException
: oracle.sql.BLOB
Conn = DBConnector.getConnection();
// Initially inserted an empty_blob() to data base
//retrieving the record and locking it.
PreparedStatement pStatement = conn.prepareStatement("Select ............... for Update")
ResultSet result = pStatement.executeQuery();
System.out.println(result.getClass().getName());
result.next();
BLOB blob =((OracleResultSet)result).getBLOB(1);
OutputStream outStream = blob.setBinaryStream(1L);
int size = blob.getBufferSize();
byte[] buffer = new byte[size];
int length = -1;
while ((length = inputStream.read(buffer)) != -1)
outStream.write(buffer, 0, length);
inputStream.close();
outStream.close();
Ive also tried casting my ResultSet obj with WrappedResultSet of org.jboss.resource.adapter package.
This is also throwing a classcastexception.
Please provide a solution.
Thanks,
Sat !
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563449#563449]
Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[JCA] - Question for the ResourceException: Interrupted while requesting permit! Waited 0 ms
by nie feng
nie feng [http://community.jboss.org/people/niefeng] created the discussion
"Question for the ResourceException: Interrupted while requesting permit! Waited 0 ms"
To view the discussion, visit: http://community.jboss.org/message/563541#563541
--------------------------------------------------------------
Hi all,
I am observing the error +"ResourceException: Interrupted while requesting permit! Waited 0 ms"+ in the peer node in the cluster when main node (the first node started in the cluster) is crashed unexpectedly.
The detail stack trace as follow
org.jboss.util.NestedSQLException: Interrupted while requesting permit! Waited 0 ms; - nested throwable: (javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
Caused by: javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:312)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:613)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
... 154 more
I am using JBOSS 4.2.3 GA, and the cluster is consisting of 2 nodes. The DB i am using is postgres 8.4.4 and i am using a Fedora 8 box.
I have read the thread ( http://community.jboss.org/message/150841#150841 http://community.jboss.org/message/150841) and it mentioned the error is related to the transaction time out, and it suggested that to include the option <blocking-timeout-millis> in the ds.xml. I still observing such error even after such option is enable in my db ds file.
<!--DS -->
<local-tx-datasource>
<jndi-name>dbdatasource</jndi-name>
<connection-url>jdbc:postgresql://localhost:35432/myPgsql</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>XXXXX</password>
<min-pool-size>10</min-pool-size>
<max-pool-size>40</max-pool-size>
<idle-timeout-minutes>15</idle-timeout-minutes>
<blocking-timeout-millis>400000</blocking-timeout-millis>
<!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL
<new-connection-sql>select 1</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL
<check-valid-connection-sql>select 1</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>PostgreSQL 7.2</type-mapping>
</metadata>
</local-tx-datasource>
Could it be my configuration is wrong? or what are the additional configuration i need to specify?
Regards
Niefeng
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563541#563541]
Start a new discussion in JCA at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - JBPM 4.4 Tomcat JNDI ProcessEngine Exception.
by Antonio Pagano
Antonio Pagano [http://community.jboss.org/people/antonio.pagano] created the discussion
"JBPM 4.4 Tomcat JNDI ProcessEngine Exception."
To view the discussion, visit: http://community.jboss.org/message/563436#563436
--------------------------------------------------------------
Hi,
I wrote a Factory for my using JBPM 4.4 ProcessEngine as a JNDI resource in Tomcat like this,
...
public class ProcessEngineFactory implements ObjectFactory {
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
return Configuration.getProcessEngine();
}
}
Im start my Tomcat and everithing goes great, but when another application needs to find anyone of the services
inside the ProcessEngineImpl (lets say RepositoryService) , i get this exception :
...
Caused by: org.jbpm.pvm.internal.wire.WireException: couldn't set commandService to org.jbpm.pvm.internal.svc.SkipInterceptor@2e8e96cd
at org.jbpm.pvm.internal.wire.operation.FieldOperation.apply(FieldOperation.java:48)
at org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.initialize(ObjectDescriptor.java:230)
... 25 more
Caused by: org.jbpm.api.JbpmException: couldn't set 'commandService' to 'org.jbpm.pvm.internal.svc.SkipInterceptor@2e8e96cd'
at org.jbpm.pvm.internal.util.ReflectUtil.set(ReflectUtil.java:170)
at org.jbpm.pvm.internal.wire.operation.FieldOperation.apply(FieldOperation.java:46)
... 26 more
Caused by: java.lang.IllegalArgumentException: Can not set org.jbpm.pvm.internal.cmd.CommandService field org.jbpm.pvm.internal.svc.AbstractServiceImpl.commandService to org.jbpm.pvm.internal.svc.SkipInterceptor
at org.jbpm.pvm.internal.util.ReflectUtil.set(ReflectUtil.java:168)
... 27 more
...
Please any help you can give me arround this topic is great received.
Thanks in advance,
Antonio
Caused by: org.jbpm.pvm.internal.wire.WireException: couldn't set commandService to org.jbpm.pvm.internal.svc.SkipInterceptor@2e8e96cd
at org.jbpm.pvm.internal.wire.operation.FieldOperation.apply(FieldOperation.java:48)
at org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.initialize(ObjectDescriptor.java:230)
... 25 more
Caused by: org.jbpm.api.JbpmException: couldn't set 'commandService' to 'org.jbpm.pvm.internal.svc.SkipInterceptor@2e8e96cd'
at org.jbpm.pvm.internal.util.ReflectUtil.set(ReflectUtil.java:170)
at org.jbpm.pvm.internal.wire.operation.FieldOperation.apply(FieldOperation.java:46)
... 26 more
Caused by: java.lang.IllegalArgumentException: Can not set org.jbpm.pvm.internal.cmd.CommandService field org.jbpm.pvm.internal.svc.AbstractServiceImpl.commandService to org.jbpm.pvm.internal.svc.SkipInterceptor
at org.jbpm.pvm.internal.util.ReflectUtil.set(ReflectUtil.java:168)
... 27 Caused by: org.jbpm.pvm.internal.wire.WireException: couldn't set commandService to org.jbpm.pvm.internal.svc.SkipInterceptor@2e8e96cd
at org.jbpm.pvm.internal.wire.operation.FieldOperation.apply(FieldOperation.java:48)
at org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor.initialize(ObjectDescriptor.java:230)
... 25 more
Caused by: org.jbpm.api.JbpmException: couldn't set 'commandService' to 'org.jbpm.pvm.internal.svc.SkipInterceptor@2e8e96cd'
at org.jbpm.pvm.internal.util.ReflectUtil.set(ReflectUtil.java:170)
at org.jbpm.pvm.internal.wire.operation.FieldOperation.apply(FieldOperation.java:46)
... 26 more
Caused by: java.lang.IllegalArgumentException: Can not set org.jbpm.pvm.internal.cmd.CommandService field org.jbpm.pvm.internal.svc.AbstractServiceImpl.commandService to org.jbpm.pvm.internal.svc.SkipInterceptor
at org.jbpm.pvm.internal.util.ReflectUtil.set(ReflectUtil.java:168)
... 27 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563436#563436]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Serializable object not being persisted.
by Phillip Thurmond
Phillip Thurmond [http://community.jboss.org/people/pthurmond%40jboss.com] created the discussion
"Serializable object not being persisted."
To view the discussion, visit: http://community.jboss.org/message/564398#564398
--------------------------------------------------------------
I have a class OrderType which is serializable, but I'm getting the following exception when I execute my process. From my understanding of the documentation, any object which is serializable can be persisted by jbpm. Is there any configuration necessary to enable this? If not, any ideas of potential causes?
Stack Trace:
org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.pvm.internal.type.variable.UnpersistableVariable is not a: org.jbpm.pvm.internal.type.Variable
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3663)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1374)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:535)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:103)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:534)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:526)
at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:241)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:291)
org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.pvm.internal.type.variable.UnpersistableVariable is not a: org.jbpm.pvm.internal.type.Variable
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3663)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1374)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:535)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:103)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:534)
.......
Thanks.
--Phillip
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/564398#564398]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Re: Concept of different locales/time zones in jBPM5
by Michael Wohlfart
Michael Wohlfart [http://community.jboss.org/people/mwohlf] created the discussion
"Re: Concept of different locales/time zones in jBPM5"
To view the discussion, visit: http://community.jboss.org/message/562524#562524
--------------------------------------------------------------
Hi Peter & HuiSheng,
I don't think the workflow engine should deal with things like timezones, DST or any kind of internationalization, that's not the job of the workflow engine. All dates and times the engine is dealing with should be UTC. Internationalization and localization, including calculating the local time for a specific user should happen in the user interface layer not in the core workflow engine.
The business calendar is a different story, right now there is a single business calendar per engine instance, and this doesn't cover all usecases. There might be users in different countries with different holidays. Having a business calendar per user seems to be a better approach but also a lot of overhead since most calendars are probably the same, but to me this seems to be the only change that is neccessary in jBPM4 to do localization.
Of course I might miss something, so please let me know if you think this wouldn't work...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562524#562524]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Transition rule EL Expression fails
by Donald Walters
Donald Walters [http://community.jboss.org/people/dondragon2] created the discussion
"Transition rule EL Expression fails"
To view the discussion, visit: http://community.jboss.org/message/563951#563951
--------------------------------------------------------------
I am using the default expression language to evaluate the rules for my transitions. But, I am getting the following exception each time it tries to process a rule in my decision node.
org.jbpm.api.JbpmException: expression condition ' #{response['resultSet'] != null && response['resultSet'][0][3] > 0}' did not return a boolean: true
at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:45)
at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62)
org.jbpm.api.JbpmException: expression condition ' #{response['resultSet'] != null && response['resultSet'][0][3] > 0}' did not return a boolean: true
at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:45)
at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62)
Why is result a string instead of a boolean?
How can I get around this?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563951#563951]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months