[jBPM] - Trying to connect to database through jBPM script task.
by avatarkim
avatarkim [https://community.jboss.org/people/avatarkim] created the discussion
"Trying to connect to database through jBPM script task."
To view the discussion, visit: https://community.jboss.org/message/828814#828814
--------------------------------------------------------------
Hi,
I'm trying to access MySql database through jBPM workflow's script task but I'm getting the error code below when the workflow run the script task. I already uploaded the MySQL driver jar file as POJO in the Guvnor and I'm still getting this error.
"No suitable driver found for jdbc:mysql://localhost:3306/test"
so I'm assuming the jBPM need some other way for it to handle MySQL driver jar but I don't know where and what should I do this for this to work.
Below is my code in my Workflow's Script Task
java.sql.Connection con = null;
java.sql.PreparedStatement pst = null;
java.sql.ResultSet rs = null;
java.sql.ResultSetMetaData rsmd = null;
String url = "jdbc:mysql://localhost:3306/test";
String user = "root";
String password = "password";
String temp = "DEBUG: ";
try
{
con = java.sql.DriverManager.getConnection(url, user, password);
pst = con.prepareStatement("SELECT * FROM aquitimber_messages");
rs = pst.executeQuery();
rsmd = rs.getMetaData();
int rowSize = 0;
rs.last();
rowSize = rs.getRow();
rs.first();
for (int countRow = 0; countRow < rowSize; countRow++)
{
for (int count = 1; count < rsmd.getColumnCount(); count++)
{
System.out.print(rs.getString(count) + ", ");
temp = temp + rs.getString(count) + ", ";
}
System.out.println();
rs.next();
}
} catch (java.sql.SQLException ex)
{
System.out.println(ex.getMessage());
temp = temp +ex.getMessage();
} finally
{
try
{
if (rs != null)
{
rs.close();
}
if (pst != null)
{
pst.close();
}
if (con != null)
{
con.close();
}
} catch (java.sql.SQLException ex)
{
System.out.println(ex.getMessage());
temp = temp +ex.getMessage();
}
}
kcontext.setVariable("approvalVar_history", temp);
Any help on this would be greatly appreciated. Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/828814#828814]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[jBPM] - Re: PermissionDeniedException on task Claim
by cold gin
cold gin [https://community.jboss.org/people/cold_gin] created the discussion
"Re: PermissionDeniedException on task Claim"
To view the discussion, visit: https://community.jboss.org/message/828860#828860
--------------------------------------------------------------
I receive the same exact error when my tasks go from claimed to released status (in rapid succession, ie - click claim/release, claim/release, buttons quickly ). I tried creating a modified operations-dsl.mvel with the settings described above. I added this file to my project classpath, but it had no effect. I also tried to directly modify the operations-dsl.mvel that resides inside of jbpm-human-task-war.war, but that did not work either. Here is the error message:
15:30:58,189 ERROR [stderr] (Thread-74) org.jbpm.task.service.PermissionDeniedException: User '[User:'...']' was unable to execution operation 'Release' on task id ... due to a no 'current status' match
Any suggestions on what I could try next? jBPM version is 5.4.0.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/828860#828860]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[Datasource Configuration] - Connection need to be done in xa-datasource with AS400 driver
by Gayratbek Komilov
Gayratbek Komilov [https://community.jboss.org/people/gayrat.komilov] created the discussion
"Connection need to be done in xa-datasource with AS400 driver"
To view the discussion, visit: https://community.jboss.org/message/823101#823101
--------------------------------------------------------------
*I have prepared standalone.xml file and I have as400 driver file (jt400.jar ) in* *c:\jboss-as-7.1.1.Final\modules\com\ibm\as400\main\*
*I have tried Datasource connection and XA-datasource connection,*
*There is no problem *datasource connection* with as400 driver.*
*
*
*this is standalone.xml file*
<datasources>
<datasource jta="false" jndi-name="java:/jdbc/as400" pool-name="as400" enabled="true" use-ccm="false">
<connection-url>jdbc:as400://122.212.243.75/mgolib;naming=sql;errors=full</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<driver>as400</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
<xa-datasource jndi-name="java:/jdbc/as400XA" pool-name="as400xa-pool" enabled="true" use-ccm="false">
<xa-datasource-property name="URL">
jdbc:as400://122.212.243.75/mgolib;naming=sql;errors=full
</xa-datasource-property>
<driver>as400XA</driver>
<xa-pool>
<is-same-rm-override>false</is-same-rm-override>
<interleaving>false</interleaving>
<pad-xid>false</pad-xid>
<wrap-xa-resource>false</wrap-xa-resource>
</xa-pool>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</xa-datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="as400" module="com.ibm.as400">
<xa-datasource-class>com.ibm.as400.access.AS400JDBCDriver</xa-datasource-class>
</driver>
<driver name="as400XA" module="com.ibm.as400">
<xa-datasource-class>com.ibm.as400.access.AS400JDBCXADataSource</xa-datasource-class>
</driver>
<driver name="ora" module="com.oracle.ojdbc6">
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>
</drivers>
</datasources>
*when I try to test connection in XA datasource this error displays*
*Please help me to solve this issue.*
*Unknown error*
Unexpected HTTP response: 500
Request
{
"address" => [
("subsystem" => "datasources"),
("xa-data-source" => "as400xa-pool")
],
"operation" => "test-connection-in-pool"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",
"rolled-back" => true
}
*after then in console*
*
*
18:27:26,927 INFO [org.jboss.as.connector.subsystems.datasources] (ServerServic
e Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Dr
iver (version 1.3)
18:27:26,933 INFO [org.jboss.as.connector] (MSC service thread 1-8) JBAS010408:
Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
18:27:26,949 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBA
S013101: Activating Security Subsystem
18:27:26,952 INFO [org.jboss.as.security] (MSC service thread 1-8) JBAS013100:
Current PicketBox version=4.0.7.Final
18:27:26,956 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48)
JBAS015537: Activating WebServices Extension
18:27:26,958 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011
940: Activating OSGi Subsystem
18:27:26,957 INFO [org.jboss.as.connector.subsystems.datasources] (ServerServic
e Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class com.ibm.a
s400.access.AS400JDBCDriver (version 7.0)
18:27:26,956 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS0
11800: Activating Naming Subsystem
18:27:26,995 INFO [org.jboss.as.connector.subsystems.datasources] (ServerServic
e Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class com.ibm.a
s400.access.AS400JDBCDriver (version 7.0)
18:27:27,024 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: St
arting Naming Service
18:27:27,027 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS01
5400: Bound mail session [java:jboss/mail/Default]
18:27:27,042 INFO [org.jboss.as.connector.subsystems.datasources] (ServerServic
e Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class oracle.jd
bc.OracleDriver (version 11.2)
18:27:27,179 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC se
rvice thread 1-8) JBoss Web Services - Stack CXF Server 4.0.2.GA
18:27:27,227 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread
1-5) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
18:27:27,256 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100:
Listening on /127.0.0.1:4447
18:27:27,258 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100:
Listening on /127.0.0.1:9999
18:27:27,258 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread
1-7) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7
.1.1.Final\standalone\deployments
18:27:27,398 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-5) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
18:27:27,398 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-3) JBAS010400: Bound data source [java:/jdbc/as400]
18:27:27,398 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-7) JBAS010400: Bound data source [java:/jdbc/as400XA]
18:27:27,411 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBA
S015876: Starting deployment of "App1.ear"
18:27:27,480 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBA
S015876: Starting deployment of "Model.jar"
18:27:27,480 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBA
S015876: Starting deployment of "View.war"
18:27:27,510 INFO [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read
persistence.xml for Model
18:27:27,567 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeplo
ymentUnitProcessor] (MSC service thread 1-5) JNDI bindings for session bean name
d Facade in deployment unit subdeployment "Model.jar" of deployment "App1.ear" a
re as follows:
java:global/App1/Model/Facade!ru.intf.Model.FacadeLocal
java:app/Model/Facade!ru.intf.Model.FacadeLocal
java:module/Facade!ru.intf.Model.FacadeLocal
java:global/App1/Model/Facade
java:app/Model/Facade
java:module/Facade
18:27:27,591 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011402: Start
ing Persistence Unit Service 'App1.ear#Model'
18:27:27,674 INFO [org.hibernate.annotations.common.Version] (MSC service threa
d 1-3) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
18:27:27,678 INFO [org.hibernate.Version] (MSC service thread 1-3) HHH000412: H
ibernate Core {4.0.1.Final}
18:27:27,679 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-3) HHH0
00206: hibernate.properties not found
18:27:27,681 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-3) HHH0
00021: Bytecode provider name : javassist
18:27:27,768 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-3
) HHH000204: Processing PersistenceUnitInfo [
name: Model
...]
18:27:27,776 INFO [org.jboss.web] (MSC service thread 1-4) JBAS018210: Register
ing web context: /View
18:27:27,808 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionPr
oviderInitiator] (MSC service thread 1-3) HHH000130: Instantiating explicit conn
ection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvid
er
18:27:27,846 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool]
(MSC service thread 1-3) IJ000604: Throwable while attempting to get a new conne
ction: null: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManage
dConnection(XAManagedConnectionFactory.java:447)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManag
edConnection(XAManagedConnectionFactory.java:385)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManag
edConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnecti
onPool.java:761)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManag
edConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConne
ction(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(
AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getMan
agedConnection(AbstractConnectionManager.java:329)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getMa
nagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.alloca
teConnection(AbstractConnectionManager.java:464)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDa
taSource.java:129)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
Connection(InjectedDataSourceConnectionProvider.java:67) [hibernate-entitymanage
r-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProvide
rJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:253) [hibernate-cor
e-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcSer
vicesImpl.java:119) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureS
ervice(StandardServiceRegistryImpl.java:75) [hibernate-core-4.0.1.Final.jar:4.0.
1.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initialize
Service(AbstractServiceRegistryImpl.java:159) [hibernate-core-4.0.1.Final.jar:4.
0.1.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService
(AbstractServiceRegistryImpl.java:131) [hibernate-core-4.0.1.Final.jar:4.0.1.Fin
al]
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
71) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.j
ava:2270) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266
) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1735) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactor
yImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
figuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
figuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFa
ctory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0
.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEn
tityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Fina
l.jar:7.1.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(Persistence
UnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se
rviceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont
rollerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt
.jar:1.7.0_10]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [r
t.jar:1.7.0_10]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_10]
Caused by: javax.resource.ResourceException: Could not find accessor on XADataSo
urce:
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSo
urce(XAManagedConnectionFactory.java:629)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManage
dConnection(XAManagedConnectionFactory.java:430)
... 30 more
Caused by: java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXAData
Source.setURL(java.lang.String)
at java.lang.Class.getMethod(Unknown Source) [rt.jar:1.7.0_10]
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSo
urce(XAManagedConnectionFactory.java:597)
... 31 more
18:27:27,945 WARN [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC se
rvice thread 1-3) HHH000342: Could not obtain connection to query metadata : jav
ax.resource.ResourceException: IJ000453: Unable to get managed connection for ja
va:/jdbc/as400XA
18:27:27,956 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-3) HHH0
00400: Using dialect: org.hibernate.dialect.DB2400Dialect
18:27:27,968 INFO [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC s
ervice thread 1-3) HHH000422: Disabling contextual LOB creation as connection wa
s null
18:27:27,978 INFO [org.hibernate.engine.transaction.internal.TransactionFactory
Initiator] (MSC service thread 1-3) HHH000268: Transaction strategy: org.hiberna
te.engine.transaction.internal.jta.CMTTransactionFactory
18:27:27,985 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (M
SC service thread 1-3) HHH000397: Using ASTQueryTranslatorFactory
18:27:28,083 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015951: Admin con
sole listening on http://127.0.0.1:9990/ http://127.0.0.1:9990
18:27:28,084 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015874: JBoss AS
7.1.1.Final "Brontes" started in 2079ms - Started 236 of 322 services (82 servic
es are passive or on-demand)
18:27:28,111 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018
559: Deployed "App1.ear"
18:27:36,219 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool]
(HttpManagementService-threads - 1) IJ000604: Throwable while attempting to get
a new connection: null: javax.resource.ResourceException: Could not create conne
ction
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManage
dConnection(XAManagedConnectionFactory.java:447) [ironjacamar-jdbc-1.0.9.Final.j
ar:1.0.9.Final]
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManag
edConnection(XAManagedConnectionFactory.java:385) [ironjacamar-jdbc-1.0.9.Final.
jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManag
edConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnecti
onPool.java:761) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManag
edConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
[ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConne
ction(AbstractPool.java:397) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(
AbstractPool.java:365) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.internalTestCo
nnection(AbstractPool.java:627) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Fin
al]
at org.jboss.jca.core.connectionmanager.pool.strategy.OnePool.testConnec
tion(OnePool.java:88) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]
at org.jboss.as.connector.pool.PoolOperations$TestConnectionInPool.invok
eCommandOn(PoolOperations.java:121) [jboss-as-connector-7.1.1.Final.jar:7.1.1.Fi
nal]
at org.jboss.as.connector.pool.PoolOperations$1.execute(PoolOperations.j
ava:60) [jboss-as-connector-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(Abstract
OperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(Abstr
actOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(Abstrac
tOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.connector.pool.PoolOperations.execute(PoolOperations.jav
a:74) [jboss-as-connector-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(Abstract
OperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(Abstr
actOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(Abstrac
tOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler
.execute(ModelControllerImpl.java:466) [jboss-as-controller-7.1.1.Final.jar:7.1.
1.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(Abstract
OperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(Abstr
actOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(Abstrac
tOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerIm
pl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.ModelControllerImpl$1.execute(ModelController
Impl.java:309) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.controller.ModelControllerImpl$1.execute(ModelController
Impl.java:299) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.domain.http.server.DomainApiHandler.processRequest(Domai
nApiHandler.java:294)
at org.jboss.as.domain.http.server.DomainApiHandler.doHandle(DomainApiHa
ndler.java:201)
at org.jboss.as.domain.http.server.DomainApiHandler.handle(DomainApiHand
ler.java:208)
at org.jboss.as.domain.http.server.security.SubjectAssociationHandler.ha
ndle(SubjectAssociationHandler.java:51)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78
)
at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:69)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81
)
at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(S
erverImpl.java:710)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78
)
at org.jboss.as.domain.http.server.RealmReadinessFilter.doFilter(RealmRe
adinessFilter.java:54)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81
)
at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:
682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt
.jar:1.7.0_10]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [r
t.jar:1.7.0_10]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_10]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-thread
s-2.0.0.GA.jar:2.0.0.GA]
Caused by: java.sql.SQLException: The application requester cannot establish the
connection. (Connection refused: connect)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConne
ction.java:2826)
at com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataS
ource.java:589)
at com.ibm.as400.access.AS400JDBCDataSource.getConnection(AS400JDBCDataS
ource.java:562)
at com.ibm.as400.access.AS400JDBCXADataSource.getXAConnection(AS400JDBCX
ADataSource.java:145)
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManage
dConnection(XAManagedConnectionFactory.java:430) [ironjacamar-jdbc-1.0.9.Final.j
ar:1.0.9.Final]
... 39 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823101#823101]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[JBoss Web Services] - Configuring @WebServiceRef on EJB via XML in AS7
by Xavier Dury
Xavier Dury [https://community.jboss.org/people/xdury] created the discussion
"Configuring @WebServiceRef on EJB via XML in AS7"
To view the discussion, visit: https://community.jboss.org/message/828798#828798
--------------------------------------------------------------
Hi,
I have some EJBs that call WebServices. In JBoss AS5, I had something like that:
@Stateless
public class MyServiceBean implements MyService {
@WebServiceRef(name = "services/MyWebService")
MyWebPort myWebService;
...
}
jboss.xml:
<session>
<ejb-name>MyServiceBean</ejb-name>
<service-ref>
<service-ref-name>services/MyWebService</service-ref-name>
<service-impl-class>eg.MyWebService</service-impl-class>
<port-component-ref>
<service-endpoint-interface>eg.MyWebPort</service-endpoint-interface>
<stub-property>
<prop-name>javax.xml.ws.service.endpoint.address</prop-name>
<prop-value>http://some.url.here</prop-value>
</stub-property>
</port-component-ref>
</service-ref>
</session>
Now that I've migrated to JBoss AS7, jboss-ejb3.xml is used instead of jboss.xml. But it seems I can't use custom jboss elements in it.
So how do I achieve this in AS7?
Thanks,
Xavier
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/828798#828798]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[jBPM] - taskId of user task is cumulating
by Thomas Colditz
Thomas Colditz [https://community.jboss.org/people/fellowtom] created the discussion
"taskId of user task is cumulating"
To view the discussion, visit: https://community.jboss.org/message/828650#828650
--------------------------------------------------------------
Hi all,
this is my first post here, since I'm pretty new with jbpm and bpm in general. Installation worked fine and trying one of the example processes is fine as well.
So I tried to set up my own process wich just consists of Start->script->user->script->end, to get a little "deeper" training. The code is (almost) the same compared to EvaluationExample2.
But I just wanted to complete 1 user task, no gateways or anything else. Long sentence short, it works fine ONCE.
Im using jBPM 6. Here's the code:
public static void main(String[] args) throws Exception{
try{
RuntimeManager manager = getRuntimeManager("process_1.bpmn");
RuntimeEngine runtime = manager.getRuntimeEngine(EmptyContext.get());
KieSession ksession = runtime.getKieSession();
// start a new process instance
Map<String, Object> params = new HashMap<String, Object>();
params.put("worker", "user1");
ksession.startProcess("process_1.bpmn", params);
// the first task
TaskService tser = runtime.getTaskService();
TaskSummary tsum = taskService.getTaskAssignedAsPotentialOwner("user1", "en-UK").get(0);
System.out.println(tsum.getId());
taskService.start(tsum.getId(), "user1");
taskService.complete(tsum.getId(), "user1", null);
manager.disposeRuntimeEngine(runtime);
} catch (Throwable t) {
t.printStackTrace();
}
System.exit(0);
}
private static RuntimeManager getRuntimeManager(String process) {
// load up the knowledge base
JBPMHelper.startH2Server();
JBPMHelper.setupDataSource();
Properties properties= new Properties();
properties.setProperty("krisv", "");
properties.setProperty("mary", "HR");
properties.setProperty("john", "PM");
UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
.userGroupCallback(userGroupCallback)
.addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2)
.get();
return RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
}
}
The error is the following: User '[UserImpl: 'user1']' was unable to execution operation 'Start' on task id 4 due to a no 'current status' match.
So everytime I:
- change the string of employee (e.g. "user1" to "user2"), it works ONCE again, but the taskId is summating (every time I try to run, its getting taskId++;). BTW the taskId should be 4.
- delete the jbpm-db.h2.db, it works fine again ONCE, but the taskId starts at 1.
- run the EvaluationExample2 in between, I can run my process again once. A second time fails (Example runs multiple times), but taskId is always 4 like it should. So this seems to 'reset' my problem.
So I hope I could explain my Problem and I'm sure its a very simple one for you. (probably just a db setup)
With kind regards!
Greetings,
FellowTom
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/828650#828650]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months