Re: [jboss-user] [jBPM] - jBPM 4.4 on sybase
by William Crowell
William Crowell [http://community.jboss.org/people/bcrowell2] replied to the discussion
"jBPM 4.4 on sybase"
To view the discussion, visit: http://community.jboss.org/message/558359#558359
--------------------------------------------------------------
I have the same issue. I can't move to another driver though. Here is what I have run into:
I am running into a problem with a simple database row insert into Sybase.
I could see others running into the same problem since we use the same jconn3 driver.
I am using iBatis 2.3.4.726 (the last version of iBatis 2), Sybase Thin jconn3 version 6.5 drivers, and JUnit 4 on Java 1.6.
The problem is that you can't insert into a table if there are more than 2 text/varchar columns defined in the table.
For instance if you have a table like this:
CREATE TABLE section(
id INTEGER IDENTITY PRIMARY KEY,
name text,
summary text,
description text
)
And you try the configuration above, you receive the following error:
com.sybase.jdbc3.jdbc.SybSQLException: A wrong datastream has been sent to the server. The server was expecting token 32 but got the
token 33. This is an internal error.
at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.tds.Tds.new(Unknown Source)
at com.sybase.jdbc3.tds.Tds.doCommand(Unknown Source)
at com.sybase.jdbc3.tds.Tds.endTransaction(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.rollback(Unknown Source)
...
at com.ibatis.common.jdbc.SimpleDataSource $SimplePooledConnection.invoke(SimpleDataSource.java:958) ...
at com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java: 68)
...
at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.rollback(JdbcTransaction.java: 72)
at com.ibatis.sqlmap.engine.transaction.TransactionManager.end(TransactionManager.java: 87)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.endTransaction(SqlMapExecutorDelegate.java: 734)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.endTransaction(SqlMapSessionImpl.java: 176)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.endTransaction(SqlMapClientImpl.java: 153)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.autoEndTransaction(SqlMapExecutorDelegate.java: 835)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java: 410)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java: 82)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java: 58)
at com.xxxxxxxxxxx.dao.SectionDAO.createSection(SectionDAO.java:75)
at com.xxxxxxxxxxx.model.SectionTest.testContext(SectionTest.java:34)
...
at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java: 160)
Now change the table definition to leave out the description field to
this:
CREATE TABLE section(
id INTEGER IDENTITY PRIMARY KEY,
name text,
summary text
)
Then the table insert happens.
There is not much on Google for the "The server was expecting token 32 but got the token 33" exception.
http://www.google.com/url?sa=D&q=http://www.talendforge.org/bugs/view.php... http://www.talendforge.org/bugs/view.php?id=13087&nbn=2
http://www.google.com/url?sa=D&q=http://comments.gmane.org/gmane.comp.jav... http://www.google.com/url?sa=D&q=http://comments.gmane.org/gmane.comp.jav...
http://www.google.com/url?sa=D&q=http://comments.gmane.org/gmane.comp.jav... http://comments.gmane.org/gmane.comp.java.ibatisdb.user/39
I see a bug was opened up on it on the old iBatis' Apache Support site:
http://www.google.com/url?sa=D&q=http://osdir.com/ml/db.ibatis.devel/2006... http://osdir.com/ml/db.ibatis.devel/2006-04/msg00036.html
But the bug was closed prematurely by Larry Meadors with iBatis
because they moved to Google Groups myBatis.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558359#558359]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
Re: [jboss-user] [jBPM] - StaleObjectStateException
by Alejandro Guizar
Alejandro Guizar [http://community.jboss.org/people/alex.guizar%40jboss.com] replied to the discussion
"StaleObjectStateException"
To view the discussion, visit: http://community.jboss.org/message/558339#558339
--------------------------------------------------------------
Gregory, stale state exceptions are to be expected if your process definition contains concurrent paths. Managing these exceptions has been the subject of multiple issues. In https://jira.jboss.org/browse/JBPM-1952 JBPM-1952 the JMS message service was reviewed and the queue configuration was changed as follows.
JBossMQ (AS 4.x)
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=JbpmJobQueue">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
<!-- JBPM-1952 a small redelivery delay goes a long way towards mitigating
stale state exceptions and deadlocks under heavy concurrency conditions -->
<attribute name="RedeliveryDelay">1000</attribute>
</mbean>
JBoss Messaging (AS 5.x)
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=JbpmJobQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<!-- JBPM-1952 a small redelivery delay goes a long way towards mitigating
stale state exceptions and deadlocks under heavy concurrency conditions -->
<attribute name="RedeliveryDelay">1000</attribute>
</mbean>
In https://jira.jboss.org/browse/JBPM-2790 JBPM-2790 the job executor and the join node were improved as follows.
* End concurrent token when it enters the join node. Check all children of the parent token have ended when the join executes.
* Make a small pause in the job executor thread before retrying a failed job. Retrying a failed job too soon will likely produce another SOSE or deadlock.
For best results, the join node should be made asynchronous in order to reduce the window of opportunity for a locking conflict.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558339#558339]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
Re: [jboss-user] [JBoss Microcontainer] - Cyclic dependencies
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] replied to the discussion
"Cyclic dependencies"
To view the discussion, visit: http://community.jboss.org/message/558337#558337
--------------------------------------------------------------
> >From what I've read, MC can do cyclic injections, but can't do cyclic dependencies (<depends>) , true?
Injection is also just a dependency.
We can do whatever you can do programatically.
It's the different states that make this happen.
e.g. if A depends on B and B depends on A, both at ctor, then of course it's impossible to solve this
class A {
A(B b) {}
}
class B {
B(A a) {}
}
but if you set the A into B via setter (which gets populated at different state), then it would work.
class B {
B() {}
void setA(A a) {}
}
The same goes for <demand> which can take the state at which you depend on target,
while you can also declare target's state.
* http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/kernel/src/m... http://anonsvn.jboss.org/repos/jbossas/projects/kernel/trunk/kernel/src/m...
<depends> is slightly different, as it has this states already "hardcoded" -- same functionality as you're used from old JMX kernel.
> I just started with MC so I am not yet too aware of what terms like Installed mean from the MC POV.
>
MC state machine works on top of linear states:
public AbstractController()
{
addState(ControllerState.NOT_INSTALLED, null);
addState(ControllerState.PRE_INSTALL, null);
addState(ControllerState.DESCRIBED, null);
addState(ControllerState.INSTANTIATED, null);
addState(ControllerState.CONFIGURED, null);
addState(ControllerState.CREATE, null);
addState(ControllerState.START, null);
addState(ControllerState.INSTALLED, null);
While you can dynamically add new states -- see DeployersImpl.
> Could you pls point me to some good material explaining this issue, and perhaps the types of relations in MC?
* http://anonsvn.jboss.org/repos/jbossas/projects/presentations/trunk/micro... http://anonsvn.jboss.org/repos/jbossas/projects/presentations/trunk/micro...
* http://java.dzone.com/articles/a-look-inside-jboss-microconta-0 http://java.dzone.com/articles/a-look-inside-jboss-microconta-0
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558337#558337]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
[JBoss Microcontainer] - Cyclic dependencies
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Cyclic dependencies"
To view the discussion, visit: http://community.jboss.org/message/558334#558334
--------------------------------------------------------------
>From Ondrej Zizka:
> I'm writing some simple MC stress test for the purpose of EAP deployers profiling.
> I've created a simple tool which generates a randomly connected graph (attached).
>
> >From what I've read, MC can do cyclic injections, but can't do cyclic dependencies (<depends>) , true?
>
> So I've injected random beans to each other, assuming that will create some cyclic deps, and inject some beans before they're declared in the XML.
>
> But when I deploy that, I get errors like:
>
> Deployment "v9" is missing the following dependencies:
> Dependency "v0" (should be in state "Installed", but is actually in state "Instantiated")
> Dependency "v3" (should be in state "Installed", but is actually in state "Instantiated")
> Dependency "v2" (should be in state "Installed", but is actually in state "Instantiated")
> Dependency "v8" (should be in state "Installed", but is actually in state "Instantiated")
> Dependency "v4" (should be in state "Installed", but is actually in state "Instantiated")
> Dependency "v1" (should be in state "Installed", but is actually in state "Instantiated")
>
> I just started with MC so I am not yet too aware of what terms like Installed mean from the MC POV.
>
> Could you pls point me to some good material explaining this issue, and perhaps the types of relations in MC?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/558334#558334]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months