[JBoss jBPM] - java.sql.SQLException: You cannot commit during a managed tr
by trouby
Hey,
I have created a very simple seam component that injects the jbpmContext and uses it to create the schema, this is the code:
| @name("workflowManager")
| public class WorkflowManager {
|
| @In
| private JbpmContext jbpmContext;
|
|
| public void createJbpmSchema() {
| jbpmContext.getJbpmConfiguration().createSchema()
| }
| }
|
When invoked, I get the following exception:
| 21:13:32,867 ERROR [SchemaExport] schema export unsuccessful
| java.sql.SQLException: You cannot commit during a managed transaction!
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:581)
| at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:482)
| at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(ManagedProviderConnectionHelper.java:30)
| at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180)
| at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
| ...
|
I looked at the source code of the createSchema method,
Seems like it's just invoking jbpmContext.close(); at the end.
My JBPM/hibernate configured in the right way not to start/close a transaction it didn't start.
What is the reason of the exception?
Thanks,
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192610#4192610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192610
17 years, 5 months
[EJB 3.0] - Configure EJB3 Container name in Jboss JMX Console
by joemir
I have a problem and already search in books, internet, but don't find anything that solve my problem.
The problem is that i make a migration from EJB2 to EJB3 in the application that i develop, using a remote interface configure with the annotation @javax.ejb.Remote and a class that representa a Stateles Session Bean that implementas the remote interface, the simple body that represents a Stateless Session Bena in the aplications is bellow:
@Stateless(name="PBXServerFacadeBean")
@RemoteBinding(jndiBinding="PBXServerFacadeBean/remote")
public class PBXServerFacadeBean implements PBXServerRemote
{
}
The EJB3 is working without any problem in the application, using the address in the property jndiBinding, but have a detail that each Session Bean is loading in JMX Console with the name of ear and the jar name wehre the Sessions are included, as we can see in example bellow:
ear=basix.ear,jar=ejb-.5.6.4.jar,name=CentrexAdminFacadeBean,service=EJB3
So when a wiil configure the dependencency of the services i need to insert the entire name of EJB and this is very bad for me, beacause it include the jar name that have a version, so if a release anotther version of EJB a will need to change the jboss-service.xml of all services. I would like to know if have a way to change this name in JMX console and don't include de jar name.
I already made many changes that a see in books and in internet, but i don't find a solution to change this name in Jboss, if somebody know about his and can help.
Thanks,
Joemir
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192602#4192602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192602
17 years, 5 months
[Installation, Configuration & DEPLOYMENT] - errors on JBoss startup - replacing Hypersonic DB with Oracl
by ilangocal
Hi
These are the errors I get when I start up JBoss. I have a new oracle-ds.xml, got rid of the hsqldb-ds.xml,, copied the ojdbc.jar file into lib, dropped in a new oracle-db-persistence.xml and have java://oracleDS in it instead of defaultDS.
What am I missing in the configuration. I even looked at some posts that talked about a similar problem. Please help
*** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
|
| jboss.ejb:persistencePolicy=database,service=EJBTimerService
| -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataS
| ourceBinding' **}
| -> jboss.jdbc:datasource=DefaultDS,service=metadata{Create:** NOT FOUND Depends on 'jboss.jdbc:datasource=DefaultDS,service=
| metadata' **}
|
| jboss.ejb:service=EJB3TimerService
| -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataS
| ourceBinding' **}
|
| jboss.ejb:service=EJBTimerService
| -> jboss.ejb:persistencePolicy=database,service=EJBTimerService{Create:Configured}
|
| jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
| -> jboss.messaging:service=PostOffice{Create:Configured}
|
| jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
| -> jboss.messaging:service=PostOffice{Create:Configured}
|
| jboss.messaging.connectionfactory:service=ConnectionFactory
| -> jboss.messaging:service=PostOffice{Create:Configured}
|
| jboss.messaging:service=PostOffice
| -> jboss.jgroups:service=ChannelFactory{Create:** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **}
|
| jboss:service=KeyGeneratorFactory,type=HiLo
| -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataS
| ourceBinding' **}
|
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| jboss.jgroups:service=ChannelFactory -> ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **
|
| jboss.jca:name=DefaultDS,service=DataSourceBinding -> ** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBin
| ding' **
|
| jboss.jdbc:datasource=DefaultDS,service=metadata -> ** NOT FOUND Depends on 'jboss.jdbc:datasource=DefaultDS,service=metadata
| ' **
|
|
| 13:13:35,954 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-192.168.95.126-8080
| 13:13:35,985 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-192.168.95.126-8009
| 13:13:36,001 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.CR2 (build: SVNTag=JBoss_5_0_0_CR2 date=200809171046)] Started
| in 2m:3s:564ms
| 13:13:36,220 WARN [HDScanner] Failed to process changes
| org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETA
| ILS):
|
| *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
|
| jboss.ejb:persistencePolicy=database,service=EJBTimerService
| -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataS
| ourceBinding' **}
| -> jboss.jdbc:datasource=DefaultDS,service=metadata{Create:** NOT FOUND Depends on 'jboss.jdbc:datasource=DefaultDS,service=
| metadata' **}
|
| jboss.ejb:service=EJB3TimerService
| -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataS
| ourceBinding' **}
|
| jboss.ejb:service=EJBTimerService
| -> jboss.ejb:persistencePolicy=database,service=EJBTimerService{Create:Configured}
|
| jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
| -> jboss.messaging:service=PostOffice{Create:Configured}
|
| jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
| -> jboss.messaging:service=PostOffice{Create:Configured}
|
| jboss.messaging.connectionfactory:service=ConnectionFactory
| -> jboss.messaging:service=PostOffice{Create:Configured}
|
| jboss.messaging:service=PostOffice
| -> jboss.jgroups:service=ChannelFactory{Create:** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **}
|
| jboss:service=KeyGeneratorFactory,type=HiLo
| -> jboss.jca:name=DefaultDS,service=DataSourceBinding{Create:** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataS
| ourceBinding' **}
|
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| jboss.jgroups:service=ChannelFactory -> ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **
|
| jboss.jca:name=DefaultDS,service=DataSourceBinding -> ** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBin
| ding' **
|
| jboss.jdbc:datasource=DefaultDS,service=metadata -> ** NOT FOUND Depends on 'jboss.jdbc:datasource=DefaultDS,service=metadata
| ' **
|
|
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:709)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:661)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:291)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:9
| 8)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:
| 181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
| at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192592#4192592
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192592
17 years, 5 months
[JNDI/Naming/Network] - Remote JNDI connects locally
by normann
I have a remote session bean running on one JBoss 4.2.3 + JDK 6 server and would like to connect to it from code running in another JBoss 4.2.3 + JDK 6 server.
My suggestion to doing this is:
Hashtable environment = new Hashtable();
| environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming rg.jnp.interfaces");
| environment.put(Context.PROVIDER_URL, "jnp://192.168.1.10:1099");
| InitialContext context = new InitialContext(enviroment);
| Object bar = context.lookup("foo");
Even though I have asked to connect to the JNDI server running at 192.168.1.10 by providing the PROVIDER_URL, the lookup seems to be performed on the JNDI server running on the same server as the code (i.e. localhost), and therefore it cannot find what I'm looking for. My conclusion is that PROVIDER_URL is ignored or that something overrides it.
It think that my setup is very common, and since I can't make it work, there must be some fundamental thing about JNDI that I don't know about, so please, could someone enlighten me? Thanks up front. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192585#4192585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192585
17 years, 5 months
[EJB 3.0] - JBoss AS 4.2.3: Lifecycle event callbacks not invoked?
by d_p_ludwig
Maybe a bug. I'm obersving some strange behaviour regarding the EJB 3 lifecycle event callbacks in JBoss AS 4.2.3.
I got a simple stateful session bean which declares some lifecycle callback methods as shown below (simplified):
| @Stateful
| public class StatefulSessionLifecycleLoggerImpl implements MyBusinessInterface {
| [...]
|
| /**
| * {@inheritDoc}
| */
| public void businessMethod() {
| }
|
| @PostConstruct
| private void logPostConstruct() {
| log.info("[PostConstruct] [" + this.toString() + "]");
| }
|
| }
|
When I lookup the bean everything works as expected, the logPostConstruct method gets called, everthing is fine. Now, when I declare a class-level interceptor for this bean
| [...]
| @Interceptors({MethodInvocationLogger.class})
| public class StatefulSessionLifecycleLoggerImpl [...]
|
|
which also declares a callback method for the "PostConstruct" lifecycle event (code shown below, simplified)
| public class MethodInvocationLogger implements Serializable {
| [...]
|
| @PostConstruct
| public void init(InvocationContext ctx) {
| [...]
| }
|
| @AroundInvoke
| public Object logMethodInvocation(InvocationContext ctx) throws Exception {
| [...]
| }
|
| }
|
then things start getting weird. The "PostConstruct" callback on the MethodInvocationLogger interceptor is being called, but the "PostConstruct" callback on the actual bean is _not_!!! As far as I understand the EJB specification both methods must have been called. Is this a bug or am I missing something?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192583#4192583
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192583
17 years, 5 months