[JBoss jBPM] - Re: Hibernate Dialect -must be explicitly set
by k.karanjkar
Hello all ,
I am getting following error .. .when I try to run my EJB application ..
I am using Jboss 4.0.4 , neatbeans 5.5 and mysql5 ..
ObjectName: persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU
State: FAILED
Reason: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=MySqlDS
Depends On Me:
jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterFacade,service=EJB3
jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterMessage,service=EJB3
ObjectName: jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterFacade,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU
ObjectName: jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterMessage,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=simplyRent.ear,jar=simplyRent-ejb.jar,unitName=simplyRent-ejbPU
State: FAILED
Reason: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=MySqlDS
Depends On Me:
jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterFacade,service=EJB3
jboss.j2ee:ear=simplyRent.ear,jar=simplyRent-ejb.jar,name=LocationMasterMessage,service=EJB3
ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
State: NOTYETINSTALLED
Depends On Me:
jboss.ejb:service=EJBTimerService,persistencePolicy=database
jboss.mq:service=StateManager
jboss.mq:service=PersistenceManager
My Mysql_ds.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mysql-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/rentdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
root
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
My persistence.xml is
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="simplyRent-ejbPU" transaction-type="JTA">
org.hibernate.ejb.HibernatePersistence
<jta-data-source>MySqlDS</jta-data-source>
ejb.user.UserMaster
ejb.LocationMaster
</persistence-unit>
and my Jboss-ds.xml is
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/rentdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
root
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
</local-tx-datasource>
Could any body tell me wht is going wrong here ...
I am not able to connect to mysql database while running
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106605#4106605
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106605
18 years, 8 months
[JBoss Messaging] - Deadlocks with ClusterRoundRobinDistributor
by travisb
During volume testing with 2 nodes I now see these deadlocks in the thread dumps (platform AS 4.2.0.GA_CP01, JBM snapshot_stable 12-Nov-2007):
Node 1:
Found one Java-level deadlock:
| =============================
| "Messaging Timeout(3)-266":
| waiting to lock monitor 0x7548e274 (object 0x83f80fa0, a java.lang.Object),
| which is held by "Thread-114"
| "Thread-114":
| waiting to lock monitor 0x7a7dc6e4 (object 0x83f80f70, a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor),
| which is held by "Messaging Timeout(3)-266"
|
| Java stack information for the threads listed above:
| ===================================================
| "Messaging Timeout(3)-266":
| at org.jboss.messaging.core.impl.MessagingQueue$DistributorWrapper.getNumberOfReceivers(MessagingQueue.java:621)
| - waiting to lock <0x83f80fa0> (a java.lang.Object)
| at org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.getNumberOfReceivers(ClusterRoundRobinDistributor.java:129)
| - locked <0x83f80f70> (a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor)
| at org.jboss.messaging.core.impl.ChannelSupport$DeliverRefTimeoutTarget.timedOut(ChannelSupport.java:956)
| at org.jboss.util.timeout.TimeoutFactory$TimeoutWorker.run(TimeoutFactory.java:265)
| at org.jboss.util.threadpool.RunnableTaskWrapper.run(RunnableTaskWrapper.java:148)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
| "Thread-114":
| at org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.getNumberOfReceivers(ClusterRoundRobinDistributor.java:129)
| - waiting to lock <0x83f80f70> (a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor)
| at org.jboss.messaging.core.impl.ChannelSupport.deliver(ChannelSupport.java:222)
| - locked <0x83f80fa0> (a java.lang.Object)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint$2.run(ServerSessionEndpoint.java:1598)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
|
| Found one Java-level deadlock:
| =============================
| "Thread-424":
| waiting to lock monitor 0x7548e2f4 (object 0x8409cda0, a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor),
| which is held by "Messaging Timeout(3)-281"
| "Messaging Timeout(3)-281":
| waiting to lock monitor 0x7548e874 (object 0x8409cdd0, a java.lang.Object),
| which is held by "Thread-424"
|
| Java stack information for the threads listed above:
| ===================================================
| "Thread-424":
| at org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.getNumberOfReceivers(ClusterRoundRobinDistributor.java:129)
| - waiting to lock <0x8409cda0> (a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor)
| at org.jboss.messaging.core.impl.ChannelSupport.deliver(ChannelSupport.java:222)
| - locked <0x8409cdd0> (a java.lang.Object)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint$2.run(ServerSessionEndpoint.java:1598)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
| "Messaging Timeout(3)-281":
| at org.jboss.messaging.core.impl.MessagingQueue$DistributorWrapper.getNumberOfReceivers(MessagingQueue.java:621)
| - waiting to lock <0x8409cdd0> (a java.lang.Object)
| at org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.getNumberOfReceivers(ClusterRoundRobinDistributor.java:129)
| - locked <0x8409cda0> (a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor)
| at org.jboss.messaging.core.impl.ChannelSupport$DeliverRefTimeoutTarget.timedOut(ChannelSupport.java:956)
| at org.jboss.util.timeout.TimeoutFactory$TimeoutWorker.run(TimeoutFactory.java:265)
| at org.jboss.util.threadpool.RunnableTaskWrapper.run(RunnableTaskWrapper.java:148)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
|
| Found 2 deadlocks.
|
Node 2:
Found one Java-level deadlock:
| =============================
| "Thread-107":
| waiting to lock monitor 0x08355a8c (object 0x841ad4d8, a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor),
| which is held by "Messaging Timeout(3)-13"
| "Messaging Timeout(3)-13":
| waiting to lock monitor 0x087f6f54 (object 0x841ad508, a java.lang.Object),
| which is held by "Thread-107"
|
| Java stack information for the threads listed above:
| ===================================================
| "Thread-107":
| at org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.getNumberOfReceivers(ClusterRoundRobinDistributor.java:129)
| - waiting to lock <0x841ad4d8> (a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor)
| at org.jboss.messaging.core.impl.ChannelSupport.deliver(ChannelSupport.java:222)
| - locked <0x841ad508> (a java.lang.Object)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint$2.run(ServerSessionEndpoint.java:1598)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
| at java.lang.Thread.run(Thread.java:595)
| "Messaging Timeout(3)-13":
| at org.jboss.messaging.core.impl.MessagingQueue$DistributorWrapper.getNumberOfReceivers(MessagingQueue.java:621)
| - waiting to lock <0x841ad508> (a java.lang.Object)
| at org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.getNumberOfReceivers(ClusterRoundRobinDistributor.java:129)
| - locked <0x841ad4d8> (a org.jboss.messaging.core.impl.ClusterRoundRobinDistributor)
| at org.jboss.messaging.core.impl.ChannelSupport$DeliverRefTimeoutTarget.timedOut(ChannelSupport.java:956)
| at org.jboss.util.timeout.TimeoutFactory$TimeoutWorker.run(TimeoutFactory.java:265)
| at org.jboss.util.threadpool.RunnableTaskWrapper.run(RunnableTaskWrapper.java:148)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
|
| Found 1 deadlock.
|
My message processing comes to a halt, but I doubt it's fully related to these 6 threads.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106604#4106604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106604
18 years, 8 months
[JBossCache] - Re: JBossCache with Hibernate on Glassfish v2
by genman
"eric.hubert" wrote :
| I also must admit I can't see any chutzpah on my side. I know the JBoss people as very open-minded and technical interessted. From my point of view Hibernate and JBoss Cache are application server independend projects and should be treated as such. Am I wrong?
|
I don't personally have a problem with wanting to know about these things in general, I know the guys at JBoss, at least the ones here don't either. But always I'm impressed with people like yourself who come in and ask questions like yours which require quite detailed answers. And not only that but who, unapologetically, assert they are porting to a competitor's solution. Additionally, a fair bit of information already exists on this topic, so it also seemed you hadn't bothered to RTFM. Or if you did, you couldn't be bothered to say what you have read and tried. And, there are a lot of stupid or lazy people who post on this forum so it's easy for people like you to be confused with either.
So, that's basically where I'm coming from.
To sort of repeat Manik's advice: My advice is to get your EJB3 app running in Java SE under Hibernate EntityManager using JBoss Cache. You should do this anyway so you have an environment that is easy to test your configuration with. Then, it should be trivial to port it to Glassfish by copying whatever persistence.xml and .jar files you are using.
I would also read the code that comes with Hibernate to figure out how Hibernate finds TreeCache, because this would be the place application server integration differences would appear:
TreeCacheProvider.java - source:
http://www.koders.com/java/fidC3D6379D1A1393672FFBF648FA69D06F8730C2D6.aspx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106603#4106603
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106603
18 years, 8 months
[JBoss Seam] - Re: selectOneMenu - NullPointerException
by siobhan.ernest
Hi all -
I actually scrapped this code and changed it to the following:
components.xml
<persistence:managed-persistence-context name="entityManager"
| auto-create="true"
| persistence-unit-jndi-name="java:/rte_trackerEntityManagerFactory"/>
plus a list seam-gen generated list bean:
@Name("uploadDefinitionList")
| public class UploadDefinitionList extends EntityQuery {
|
| private static final String[] RESTRICTIONS = {
| "lower(uploadDefinition.name) like concat(lower(#{uploadDefinitionList.uploadDefinition.name}),'%')",
| "lower(uploadDefinition.headers) like concat(lower(#{uploadDefinitionList.uploadDefinition.headers}),'%')",
| "lower(uploadDefinition.matchOn) like concat(lower(#{uploadDefinitionList.uploadDefinition.matchOn}),'%')",
| "lower(uploadDefinition.uploadType) like concat(lower(#{uploadDefinitionList.uploadDefinition.uploadType}),'%')",};
|
| private UploadDefinition uploadDefinition = new UploadDefinition();
|
| @Override
| public String getEjbql() {
| return "select uploadDefinition from UploadDefinition uploadDefinition";
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public UploadDefinition getUploadDefinition() {
| return uploadDefinition;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
| }
|
| }
The upload action:
public abstract class EntityUploadAction {
| @Logger
| Log log;
|
| @PersistenceContext
| protected EntityManager entityManager;
|
| @In
| protected FacesMessages facesMessages;
|
|
| <snip>
|
|
| protected UploadDefinition selectedUploadDefinition;
|
|
| <snip>
|
| public UploadDefinition getSelectedUploadDefinition() {
| return selectedUploadDefinition;
| }
|
| public void setSelectedUploadDefinition(UploadDefinition selectedUploadDefinition) {
| this.selectedUploadDefinition = selectedUploadDefinition;
| }
|
| <snip>
| }
The upload action is used more than once, so this is extended in other actions.
And finally, the .xhtml
<s:decorate id="selectedUploadDefinitionnDecoration" template="layout/edit.xhtml">
| <ui:define name="label">Upload Definition</ui:define>
| <h:selectOneMenu value="#{studentUploadService.selectedUploadDefinition}" required="true"
| id="selectedUploadDefinition">
| <s:selectItems value="#{uploadDefinitionList}" var="ud" label="#{ud.name}"
| noSelectionLabel="Please Select..."/>
| <s:convertEntity/>
| </h:selectOneMenu>
| </s:decorate>
It all works, and I am happy - just posting this for anyone who might be interested.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106598#4106598
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106598
18 years, 8 months