[EJB 3.0] - Re: Deployment dependencies...
by jactor
... and my frustration is growing...
I restarted the server and then experienced another error:
anonymous wrote : --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:module=concept.jar,uid=31374579,service=EJB3
| State: FAILED
| Reason: java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jar=concept.jar,name=EntityServiceBean,service=EJB3 already registered.
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.j2ee:module=concept.jar,uid=31374579,service=EJB3
| State: FAILED
| Reason: java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jar=concept.jar,name=EntityServiceBean,service=EJB3 already registered.
It seems that the service is installed when deploying my sar which is not reacting to its own dependencies (the original issue). My service xml file:
<?xml version="1.0" encoding="UTF-8"?>
|
| <server>
| <mbean code="concept.jmx.Checker" name="concept:jmx=concept.jmx.Checker">
| </mbean>
| <depends-list>
| <depends>
| jboss.j2ee:jar=concept.jar,name=EntityServiceBean,service=EJB3
| </depends>
| <depends>persistence.units:unitName=concept</depends>
| </depends-list>
| </server>
Can anyone come with a suggestion of how o solve this? Do I need to make my deployer sleep between deploying my jar and sar, to be sure that the jar is installed when the sar file is deployed? This is an ugly solution and I am open for other suggestions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974489#3974489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974489
19 years, 7 months
[EJB 3.0] - Re: Deployment dependencies...
by jactor
I thought I found the solution...
I am one step closer, but now this is the case:anonymous wrote : --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:service=EJB3,module=concept.jar
| State: FAILED
| Reason: java.lang.RuntimeException: Field protected javax.persistence.EntityManager concept.service.EntityServiceBean.manager @PersistenceUnit in error: EMPTY STRING unitName but there is no deployments in scope
|
| ObjectName: jboss.j2ee:module=concept.jar,uid=4684622,service=EJB3
| State: FAILED
| Reason: java.lang.RuntimeException: Field protected javax.persistence.EntityManager concept.service.EntityServiceBean.manager @PersistenceUnit in error: EMPTY STRING unitName but there is no deployments in scope
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.j2ee:module=concept.jar,uid=4684622,service=EJB3
| State: FAILED
| Reason: java.lang.RuntimeException: Field protected javax.persistence.EntityManager concept.service.EntityServiceBean.manager @PersistenceUnit in error: EMPTY STRING unitName but there is no deployments in scope
|
| ObjectName: jboss.j2ee:service=EJB3,module=concept.jar
| State: FAILED
| Reason: java.lang.RuntimeException: Field protected javax.persistence.EntityManager concept.service.EntityServiceBean.manager @PersistenceUnit in error: EMPTY STRING unitName but there is no deployments in scope
I am creating a jar including all the beans except the MBean. I am creating a sar including the MBean and the jar created earlier. Both of these files are copied into the deploy folder and this error message is logged... Since the name of the jar was concept, I renamed the name of the persistence unit to be concept, but this did not help. My code now:
<?xml version="1.0" encoding="UTF-8"?>
| <persistence>
| <persistence-unit name="concept">
| <jta-data-source>java:/DefaultDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop" />
| </properties>
| </persistence-unit>
| </persistence>
| ...
| @PersistenceContext(name = "concept", unitName = "concept")
| protected EntityManager manager = null;
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974485#3974485
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974485
19 years, 7 months
[JBoss jBPM] - problem in jbpm1.3.2 with oracle9i backend
by lampli
hi all,
When i excute "ant create.db -buildfile build.deploy.xml",there are some exception like below, and my configuration in build.deploy.xml is:
<target name="create.db" depends="declare.jbpm.tasks" description="creates a oracle database with the jbpm tables and loads the processes in there">
| <jbpmschema actions="create"
| cfg="${basedir}/src/config.files/hibernate.cfg.xml" />
| <loadidentities file="${basedir}/src/resources/oracle/identity.db.xml"
| cfg="${basedir}/src/config.files/hibernate.cfg.xml" />
| <ant antfile="build.xml" target="build.processes" inheritall="false" />
| <deployprocess cfg="${basedir}/src/config.files/hibernate.cfg.xml" >
| <fileset dir="build" includes="*.process" />
| </deployprocess>
| </target>
the hibernate.cfg.xml content is:
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
| <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
| <property name="hibernate.connection.url">jdbc:oracle:thin:@172.18.13.11:1521:platform</property>
| <property name="hibernate.connection.username">epstar29</property>
| <property name="hibernate.connection.password">wiscom</property>
| <property name="hibernate.query.substitutions">true 1, false 0</property>
exceptions:
[loadidentities] 17:25:24,328 [main] INFO SessionFactoryObjectFactory : Not bin
ding factory to JNDI, no JNDI name configured
[loadidentities] 17:25:24,328 [main] INFO SessionFactoryImpl : Checking 28 name
d HQL queries
[loadidentities] 17:25:24,500 [main] INFO SessionFactoryImpl : Checking 0 named
SQL queries
[loadidentities] 17:25:24,500 [main] ERROR SessionFactoryImpl : Error in named q
uery: GraphSession.findAllProcessDefinitionVersions
[loadidentities] org.hibernate.QueryException: ClassNotFoundException: org.hiber
nate.hql.ast.HqlToken [
[loadidentities]
[loadidentities] select pd
[loadidentities] from org.jbpm.graph.def.ProcessDefinition as pd
[loadidentities] where pd.name = :name
[loadidentities] order by pd.version desC
[loadidentities]
[loadidentities] ]
[loadidentities] at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57
)
[loadidentities] at antlr.CharScanner.setTokenObjectClass(CharScanner.jav
a:238)
[loadidentities] at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(Hq
lLexer.java:31)
[loadidentities] at antlr.CharScanner.(CharScanner.java:42)
[loadidentities] at antlr.CharScanner.(CharScanner.java:49)
[loadidentities] at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLe
xer.java:56)
[loadidentities] at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLe
xer.java:53)
[loadidentities] at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLe
xer.java:50)
[loadidentities] at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:2
6)
[loadidentities] at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser
.java:44)
[loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(Query
TranslatorImpl.java:232)
[loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(Q
ueryTranslatorImpl.java:155)
[loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(Que
ryTranslatorImpl.java:105)
[loadidentities] at org.hibernate.engine.query.HQLQueryPlan.(HQLQue
ryPlan.java:74)
[loadidentities] at org.hibernate.engine.query.HQLQueryPlan.(HQLQue
ryPlan.java:53)
[loadidentities] at org.hibernate.engine.query.QueryPlanCache.getHQLQuery
Plan(QueryPlanCache.java:71)
[loadidentities] at org.hibernate.impl.SessionFactoryImpl.checkNamedQueri
es(SessionFactoryImpl.java:363)
[loadidentities] at org.hibernate.impl.SessionFactoryImpl.(SessionF
actoryImpl.java:327)
[loadidentities] at org.hibernate.cfg.Configuration.buildSessionFactory(C
onfiguration.java:1154)
[loadidentities] at org.jbpm.persistence.db.DbPersistenceServiceFactory.g
etSessionFactory(DbPersistenceServiceFactory.java:90)
[loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessi
onFactory(DbPersistenceService.java:74)
[loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessi
on(DbPersistenceService.java:78)
[loadidentities] at org.jbpm.JbpmContext.getSession(JbpmContext.java:464)
[loadidentities] at org.jbpm.identity.ant.LoadIdentitiesTask.execute(Load
IdentitiesTask.java:62)
[loadidentities] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:275)
[loadidentities] at org.apache.tools.ant.Task.perform(Task.java:364)
[loadidentities] at org.apache.tools.ant.Target.execute(Target.java:341)
[loadidentities] at org.apache.tools.ant.Target.performTasks(Target.java:
369)
[loadidentities] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1216)
[loadidentities] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1185)
[loadidentities] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:40)
[loadidentities] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1068)
[loadidentities] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[loadidentities] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[loadidentities] at org.apache.tools.ant.launch.Launcher.run(Launcher.jav
a:246)
[loadidentities] at org.apache.tools.ant.launch.Launcher.main(Launcher.ja
va:67)anonymous wrote :
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974482#3974482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974482
19 years, 7 months
[JBoss jBPM] - problem in jbpm1.3.2 with oracle9i backend
by lampli
hi all,
When i excute "ant create.db -buildfile build.deploy.xml",there are some exception like below, and my configuration in build.deploy.xml is:
<target name="create.db" depends="declare.jbpm.tasks" description="creates a oracle database with the jbpm tables and loads the processes in there">
| <jbpmschema actions="create"
| cfg="${basedir}/src/config.files/hibernate.cfg.xml" />
| <loadidentities file="${basedir}/src/resources/oracle/identity.db.xml"
| cfg="${basedir}/src/config.files/hibernate.cfg.xml" />
| <ant antfile="build.xml" target="build.processes" inheritall="false" />
| <deployprocess cfg="${basedir}/src/config.files/hibernate.cfg.xml" >
| <fileset dir="build" includes="*.process" />
| </deployprocess>
| </target>
the hibernate.cfg.xml content is:
org.hibernate.dialect.Oracle9Dialect
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@172.18.13.11:1521:platform
epstar29
wiscom
true 1, false 0
exceptions:
[loadidentities] 17:25:24,328 [main] INFO SessionFactoryObjectFactory : Not bin
ding factory to JNDI, no JNDI name configured
[loadidentities] 17:25:24,328 [main] INFO SessionFactoryImpl : Checking 28 name
d HQL queries
[loadidentities] 17:25:24,500 [main] INFO SessionFactoryImpl : Checking 0 named
SQL queries
[loadidentities] 17:25:24,500 [main] ERROR SessionFactoryImpl : Error in named q
uery: GraphSession.findAllProcessDefinitionVersions
[loadidentities] org.hibernate.QueryException: ClassNotFoundException: org.hiber
nate.hql.ast.HqlToken [
[loadidentities]
[loadidentities] select pd
[loadidentities] from org.jbpm.graph.def.ProcessDefinition as pd
[loadidentities] where pd.name = :name
[loadidentities] order by pd.version desC
[loadidentities]
[loadidentities] ]
[loadidentities] at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57
)
[loadidentities] at antlr.CharScanner.setTokenObjectClass(CharScanner.jav
a:238)
[loadidentities] at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(Hq
lLexer.java:31)
[loadidentities] at antlr.CharScanner.(CharScanner.java:42)
[loadidentities] at antlr.CharScanner.(CharScanner.java:49)
[loadidentities] at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLe
xer.java:56)
[loadidentities] at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLe
xer.java:53)
[loadidentities] at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLe
xer.java:50)
[loadidentities] at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:2
6)
[loadidentities] at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser
.java:44)
[loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(Query
TranslatorImpl.java:232)
[loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(Q
ueryTranslatorImpl.java:155)
[loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(Que
ryTranslatorImpl.java:105)
[loadidentities] at org.hibernate.engine.query.HQLQueryPlan.(HQLQue
ryPlan.java:74)
[loadidentities] at org.hibernate.engine.query.HQLQueryPlan.(HQLQue
ryPlan.java:53)
[loadidentities] at org.hibernate.engine.query.QueryPlanCache.getHQLQuery
Plan(QueryPlanCache.java:71)
[loadidentities] at org.hibernate.impl.SessionFactoryImpl.checkNamedQueri
es(SessionFactoryImpl.java:363)
[loadidentities] at org.hibernate.impl.SessionFactoryImpl.(SessionF
actoryImpl.java:327)
[loadidentities] at org.hibernate.cfg.Configuration.buildSessionFactory(C
onfiguration.java:1154)
[loadidentities] at org.jbpm.persistence.db.DbPersistenceServiceFactory.g
etSessionFactory(DbPersistenceServiceFactory.java:90)
[loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessi
onFactory(DbPersistenceService.java:74)
[loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessi
on(DbPersistenceService.java:78)
[loadidentities] at org.jbpm.JbpmContext.getSession(JbpmContext.java:464)
[loadidentities] at org.jbpm.identity.ant.LoadIdentitiesTask.execute(Load
IdentitiesTask.java:62)
[loadidentities] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:275)
[loadidentities] at org.apache.tools.ant.Task.perform(Task.java:364)
[loadidentities] at org.apache.tools.ant.Target.execute(Target.java:341)
[loadidentities] at org.apache.tools.ant.Target.performTasks(Target.java:
369)
[loadidentities] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1216)
[loadidentities] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1185)
[loadidentities] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:40)
[loadidentities] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1068)
[loadidentities] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[loadidentities] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[loadidentities] at org.apache.tools.ant.launch.Launcher.run(Launcher.jav
a:246)
[loadidentities] at org.apache.tools.ant.launch.Launcher.main(Launcher.ja
va:67)anonymous wrote :
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974481#3974481
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974481
19 years, 7 months
[JBoss Messaging] - Re: Remote JMS server
by mskonda
"rcjboss" wrote :
| 1. I will deploy JBoss Messaging as an independent server hosting all my Queues.
| 2. The persistance for msg will be Oracle.
| 3. I will have a standby replica instance of the above JBoss on a different machine, that will have the same Queues and will connect to same oracle. This will be my manual failover server.
|
| And I will have a cluster of 2 JBoss 4.0.4 which will host MDBs in a cluster that will be listening to the (remote) Queues mentioned above.
|
| First of all, Please confirm that this is a workable solution.
|
I don't see why not, assuming you have configured the MDBs talking to the remote JMS Server as explained the accessing remote jms doc.
anonymous wrote :
| Can I not achieve the same by: installing JBoss Messaging on the servers that run the MDBs and just not configure the Queues on them (will this be a complete and easier way to achieve the scoped libraries?).
|
Yes. What you are doign is - you have local jms server (along with the MDB Container) having components accessing remote JMS Server which is quite alright if you put up with co-existing JMS server.
As far as I know, you would do scoping if you wish to have no co-existing JMS Server within you EJBContainer (that is, application server).
/Madhu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974480#3974480
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974480
19 years, 7 months
[Persistence, JBoss/CMP, Hibernate, Database] - jboss-4.0.4GA & hibernate 3.1.3: version updated on Select??
by benoitx
Hi,
I have searched this forum but could not find a match to my question, I apologise if it is already answered (please point me to the answer).
I recently noticed that the version number on hibernate objects gets updated on SELECT and return from a stateless session bean (non ejb3).
My EJB calls a 'reader' that simply returns a list via "select x from MyObject as x"
query.list();
and I get the session like this:
protected Session getSession() {
try {
final InitialContext ctx = new InitialContext();
final SessionFactory factory = (SessionFactory) ctx.lookup("java:/hibernate/SessionFactory");
return factory.getCurrentSession();
} catch (final NamingException e) {
throw new HibernateException(e);
}
}
and the query:
query = s.createQuery("select x from MyObject as x");
My object is defined in hbm with
<version name="version" unsaved-value="negative" />
When the object is returned from the EJB, Jboss seems to update the version....
WHY??? Nothing has changed?
Any pointer most appreciated and will earn my eternal gratitude for at least 1 minute.
Many thanks
Benoit
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974478#3974478
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974478
19 years, 7 months