[Datasource Configuration] - SQLException encountered while trying to use a DB connection
by mou_gc
mou_gc [https://community.jboss.org/people/mou_gc] created the discussion
"SQLException encountered while trying to use a DB connection"
To view the discussion, visit: https://community.jboss.org/message/792713#792713
--------------------------------------------------------------
Hi all,
We have configured a read datasource in our JBOSS 4.2.3 AS, for reading from one of the tables in the Oracle 10g DB of our application. In the business logic of our application, first, we create a Query Object, which has a Connection object as its component variable. This Connection object is initialised by obtaining a conncetion from the mentioned data source. In the next step, we try to do a read from the DB, and this read uses the stored connection object to execute the query.
Initially, this logic was not working and we received error messages like "Caused by: java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@6acfc9" in our application log and "Closing a connection for you" in the server.log. After going through the link - https://community.jboss.org/docs/DOC-9325 https://community.jboss.org/wiki/ConfigCachedConnectionManager, we set SpecCompliant as true in jbossjca-service.xml, to resolve this issue, although we didn't turn off debugging. This made things to work in our dev set up, but in the production servers, almost all the times it fails. We still see the exception -
java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@37408cb8
Can anybody help us to understand if there is any timeout for connections or if any additional configuration change is needed? Thanks in advance.
(Attaching the ds xml file)
Mou
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/792713#792713]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[jBPM] - Deploying jBPM5.4 using EAR on AS 7.1.1
by Albert Chua
Albert Chua [https://community.jboss.org/people/badduck] created the discussion
"Deploying jBPM5.4 using EAR on AS 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/794770#794770
--------------------------------------------------------------
Hi,
I'm a newbie to jBPM and Drools. I have successfully done installed AS 7.1.1 with jBPM 5.4 and Drools 5.4 war files deployed.
Now I am trying to deploy a EAR file containing a stateful bean. The bean is suppose to grab the bpmn file from the Guvnor and run the workflow.
Unfortunately when I tried to deploy the EAR files containing all the dependencies, it hit the following error (attached is the full server.log):
11:53:51,295 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "middleoffice-ear.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"middleoffice-ear.ear#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-dsMissing[jboss.persistenceunit.\"middleoffice-ear.ear#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-ds]"]}
11:53:51,295 INFO [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011403: Stopping Persistence Unit Service 'middleoffice-ear.ear/middleoffice-ejb.jar#org.jbpm.task'
11:53:51,295 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011403: Stopping Persistence Unit Service 'middleoffice-ear.ear/middleoffice-ejb.jar#org.jbpm.persistence.jpa'
11:53:51,311 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment middleoffice-ejb.jar in 42ms
11:53:51,405 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment middleoffice-ear.ear in 132ms
11:53:51,405 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.jdbc.jbpm-ds (missing) dependents: [service jboss.persistenceunit."middleoffice-ear.ear#org.jbpm.persistence.jpa"]
11:53:51,405 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"middleoffice-ear.ear#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-dsMissing[jboss.persistenceunit.\"middleoffice-ear.ear#org.jbpm.persistence.jpa\"jboss.naming.context.java.jdbc.jbpm-ds]"]}}}
What is wrong with my EAR deployment fuke?
Thanks & Kind Regards,
Albert
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/794770#794770]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[jBPM] - jbpm5 scale out reference architecture..
by Affan Dar
Affan Dar [https://community.jboss.org/people/affandar] created the discussion
"jbpm5 scale out reference architecture.."
To view the discussion, visit: https://community.jboss.org/message/717611#717611
--------------------------------------------------------------
After scavenging the forums and docs for jbpm 5 over the last week, I have drafted up the attached 'reference architecture' for a scalable jBPM 5 deployment. Would love to get feedback (aka ripped apart :) ).
Here are the key pieces:
1. A shared KnowlegeBase which acts as a repository of processes across the whole deployment (master-slave replicated with writes-to-master and reads-from-slaves etc etc)
2. There are a fixed number of KnowledgeSessions spread across DBs in a DB farm (DB1, DB2)
3. A table contains the mapping between these sessions, the database that they are stored in and the node that is assigned to these sessions. Management of the data in this table is an admin config operation (either automatic or manual).
4. A number of worker nodes which load the KnowledgeSessions that belong to them (as per the table above)
5. Another table that has mapping of processes-to-sessions. This table is updated by the worker nodes when a new process is created.
6. A router or client proxy that routes process instance managment requests as per the following rules:
- For process instance creation requests, round robin to any node
- For requests pertaining to a specific process instance, consult the table in (5) & (6) and route to appropriate node
Now how to scale out:
- If the bottleneck is the CPU/memory of the worker nodes then add more nodes and rebalance the session distribution in table (3)
- If the bottleneck is the DB capacity or disk then add a database, migrate processes/session data to the new database and update table (3)
Of course the resharding above is crude and manual and can probably be more sophisticated but would love to hear thoughts/comments on the basic idea.
Also practically speaking, I hope it is possible to migrate a session and processes to a different DB at all?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/717611#717611]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[JBoss Tools] - jboss-packaging-maven-plugin jboss-esb + m2e
by chmanosh
chmanosh [https://community.jboss.org/people/chmanosh] created the discussion
"jboss-packaging-maven-plugin jboss-esb + m2e"
To view the discussion, visit: https://community.jboss.org/message/794351#794351
--------------------------------------------------------------
Hi,
Does jboss-packaging-maven-plugin m2e connector work for jboss-esb? When I import a maven jboss-esb project into eclipse (m2e installed), it does not covert it into an Eclipse JBoss ESB (facet is not enabled and dependecies are not set) project. I tried almost all versions of eclipse, m2e, jboss tools and jboss soa tools, to make it work, but no use. This is my work around for now
1. Turn on facet nature and enable JBOSS ESB nature.
2. Then it get recognized as a deployable artifact on JBoss server.
3. Manually add all dependencies in "Deployment and Assembly section".
What I was expecting was all steps should have been done by m2e jboss esb (jboss-packaging-maven-plugin) connector. I could not find a relevant post or article related to it. Does this feature ever supported?
Thank you in advance.
Manosh
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/794351#794351]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[jBPM] - Migration jbpm 3 to jbpm5
by y lab
y lab [https://community.jboss.org/people/yjboss] created the discussion
"Migration jbpm 3 to jbpm5"
To view the discussion, visit: https://community.jboss.org/message/794721#794721
--------------------------------------------------------------
Hi,
I must migrate a code integration . in JBPM3 i have :
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
GraphSession graphSession = jbpmContext.getGraphSession();
ProcessDefinition definition = graphSession.findLatestProcessDefinition(processDefinitionName);
ProcessInstance instance = new ProcessInstance(definition);
...
instance.getContextInstance().setTransientVariable(IntegrationInfo.INTEGRATION_INFO,var);
instance.signal();
...
jbpmContext.save(instance);
jbpmContext.close();
i am new in jbpm5 and i demand what is the effecient equivalent migration of this code in jbpm5.
Thanks for your helps.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/794721#794721]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[jBPM] - JBPM5 and hibernate3 on Jboss as7
by y lab
y lab [https://community.jboss.org/people/yjboss] created the discussion
"JBPM5 and hibernate3 on Jboss as7"
To view the discussion, visit: https://community.jboss.org/message/793572#793572
--------------------------------------------------------------
I want to use hibernate 3 as JPA provider in jboss as7 ;
- Create a folder in AS7_HOME\modules\org\hibernate\3 for slot 3 to hold hibernate 3 jars.
- I Create the AS7_HOME/modules/org/hibernate/3/module.xml file with contents :
<module xmlns="urn:jboss:module:1.1" name="org.hibernate" slot="3">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="hibernate-commons-annotations-3.1.0.GA.jar"/>
<resource-root path="hibernate-entitymanager-3.4.0.GA.jar"/>
<resource-root path="hibernate-core-3.3.2.GA.jar"/>
<resource-root path="antlr-3.3.jar"/>
<resource-root path="asm-3.3.jar"/>
<resource-root path="btm-2.1.2.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="org.jboss.as.jpa.hibernate" slot="3"></module>
<module name="javax.api"></module>
<module name="javax.persistence.api"></module>
<module name="javax.transaction.api"></module>
<module name="javax.validation.api"></module>
<module name="org.antlr"></module>
<module name="org.apache.ant"></module>
<module name="org.apache.commons.collections"></module>
<module name="org.dom4j"></module>
<module name="org.infinispan"></module>
<module name="org.javassist"></module>
<module name="org.jboss.logging"></module>
<module name="org.slf4j"></module>
</dependencies>
</module>
in my persistence.xml i use :
<property name="jboss.as.jpa.providerModule" value="org.hibernate:3"></property>
Whene i start my server i take the following error :
Failed to define class org.jboss.as.jpa.hibernate3.infinispan.InfinispanRegionFactory in Module "org.jboss.as.jpa.hibernate:3" from local module loader @1dec1dd (roots: C:\PIXID\jboss-as-7.1.1.Final\modules): java.lang.LinkageError: Failed to link org/jboss/as/jpa/hibernate3/infinispan/InfinispanRegionFactory (Module "org.jboss.as.jpa.hibernate:3" from local module loader @1dec1dd (roots: C:\PIXID\jboss-as-7.1.1.Final\modules))
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
Any help?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793572#793572]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[Beginner's Corner] - Arquilian issue at bean-validation quickstart
by James Freitas
James Freitas [https://community.jboss.org/people/jamesfrj] created the discussion
"Arquilian issue at bean-validation quickstart"
To view the discussion, visit: https://community.jboss.org/message/794702#794702
--------------------------------------------------------------
Hello!!
My configuration:
Windows XP
JBoss 7.0.13 Final
Maven 3.0.4
I was trying to run the Arquilian tests, at the bean-validation quickstart, but I've got this error:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.as.quickstarts.bean_validation.test.MemberValidationTest
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
28/01/2013 15:58:58 org.jboss.arquillian.container.impl.MapObject populate
AVISO: Configuration contain properties not supported by the backing object org.jboss.as.arquillian.container.remote.RemoteContainerConfiguration
Unused property entries: {jbossHome=C:\jboss-as-7.1.1.Final}
Supported property names: [managementPort, username, managementAddress, password]
28/01/2013 15:59:05 org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
AVISO: Exception encountered during export of archive
org.jboss.shrinkwrap.api.exporter.ArchiveExportException: Failed to write asset
to output: /WEB-INF/lib/arquillian-testenricher-ejb.jar
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$3.
handle(StreamExporterDelegateBase.java:272)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:219)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.processNode(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:105)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.processNode(AbstractExporterDelegate.java:109)
at org.jboss.shrinkwrap.impl.base.exporter.AbstractExporterDelegate.doExport(AbstractExporterDelegate.java:95)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase.access$001(StreamExporterDelegateBase.java:50)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:121)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$1.call(StreamExporterDelegateBase.java:116)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:124)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)
at java.io.PipedInputStream.receive(PipedInputStream.java:210)
at java.io.PipedOutputStream.write(PipedOutputStream.java:132)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:155)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:196)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:84)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate.closeEntry(JdkZipExporterDelegate.java:40)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:265)
at org.jboss.shrinkwrap.impl.base.exporter.StreamExporterDelegateBase$2.execute(StreamExporterDelegateBase.java:233)
at org.jboss.shrinkwrap.impl.base.io.IOUtil.closeOnComplete(IOUtil.java:217)
... 15 more
28/01/2013 15:59:05 org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1 call
AVISO: [SHRINKWRAP-120] Possible deadlock scenario: Got exception on closing the ZIP out stream: Pipe closed
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:244)
at java.io.PipedInputStream.receive(PipedInputStream.java:210)
at java.io.PipedOutputStream.write(PipedOutputStream.java:132)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:155)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:196)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:301)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:140)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:148)
at org.jboss.shrinkwrap.impl.base.exporter.zip.JdkZipExporterDelegate$1.call(JdkZipExporterDelegate.java:118)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.937 sec <<< FAILURE!
Results :
Tests in error:
org.jboss.as.quickstarts.bean_validation.test.MemberValidationTest: Could not deploy to container: JBAS012144: Could not connect to remote://127.0.0.1:9999. T
he connection timed out
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.500s
[INFO] Finished at: Mon Jan 28 15:59:09 BRST 2013
[INFO] Final Memory: 19M/45M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.
10:test (default-test) on project bean-validation: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Documents and Settings\xxxx\Desktop\Stuff\@appz\Java\
JBossJBDevProjects\bean-validation\target\surefire-reports for the individual te
st results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
D:\Documents and Settings\xxxx\Desktop\Stuff\@appz\Java\JBossJBDevProjects\bean-validation>
Can you help on this issue?
This is the content of my arquilian.xml file:
<arquillian xmlns=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!-- Uncomment to have test archives exported to the file system for inspection -->
<!-- <engine> -->
<!-- <property name="deploymentExportPath">target/</property> -->
<!-- </engine> -->
<!-- Force the use of the Servlet 3.0 protocol with all containers, as it is the most mature -->
<defaultProtocol type="Servlet 3.0" />
<!-- Example configuration for a managed/remote JBoss AS 7 instance -->
<container qualifier="jboss" default="true">
<!-- If you want to use the JBOSS_HOME environment variable, just delete the jbossHome property -->
<configuration>
*<property name="jbossHome">C:\jboss-as-7.1.1.Final</property>*
</configuration>
</container>
</arquillian>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/794702#794702]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[Beginner's Corner] - About the Quickstarts
by James Freitas
James Freitas [https://community.jboss.org/people/jamesfrj] created the discussion
"About the Quickstarts"
To view the discussion, visit: https://community.jboss.org/message/794459#794459
--------------------------------------------------------------
Hello, everybody!!
I am a totally newbie at JBoss Development. I have tested all the Quickstarts (HelloWorld, Login, NumberGuess, etc) and they have worked fine, but I would like to take the next step!
I mean, I would like initially to create these applications from the scratch, but I am not sure how to do it.
For instance I was trying to create a HelloWorld application by my own hands, but what Project should I create ? When I use Java EE Web Project, it comes with a lot of components that I don't use for such a simple task.
Is there a how to for QuickStarts creation? Can you help me out?
Just the initial step, I mean, the kind of project that I should create for these Quickstarts, would be already a great help...
Thank you
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/794459#794459]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months