[Beginner's Corner] - JBoss:EJB is not creating table in MySQL DB
by Gurubg G
Gurubg G [http://community.jboss.org/people/gurubg] created the discussion
"JBoss:EJB is not creating table in MySQL DB"
To view the discussion, visit: http://community.jboss.org/message/580992#580992
--------------------------------------------------------------
Hello Folks,
I have a strange problem, I am not receiving any error when I deploy my http://www.coderanch.com/forums/f-11/EJB-JEE EJB project to http://www.coderanch.com/forums/f-63/JBoss JBoss . I have a single entity bean defined and expecting it to be created in MySQL DB. But strangely I do not see any table created . Has anyone faced the same problem before ?
I am using Eclipse IDE, MySQL server 51.1 and JBoss 5.0.1 server..
Please find the log attached ..
And I am posting the configuration files I have used.
|| *Peristence.xml* ||
| <?xml version="1.0" encoding="UTF-8" ?>
<persistence version="2.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_2_0.xsd">
<persistence-unit name="LessonDS-PU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/lessonds</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
</properties>
</persistence-unit>
</persistence> |
|| *mysql-ds.xml* ||
| <?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mysql-ds.xml 41017 2006-02-07 14:26:14Z acoliver $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
<datasources>
<local-tx-datasource>
<jndi-name>lessonds</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/lessonds</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>guru</password>
<!-- <connection-property name="autoReconnect">true</connection-property> -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources> |
I have placed the DB conenctor file mysql-connector-java-5.1.14-bin.jar in \server\default\lib folder ..
This is my code for Entity which I am trying to create
|| *Entity bean* ||
|
package com.lessonejb.entities;
import java.io.Serializable;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.OneToMany;
//@SuppressWarnings("serial")
@Entity
@Table(name="lessonuser")
public class User implements Serializable {
private static final CascadeType[] ALL = null;
private String email;
private String password;
private String name;
private String surname;
private int role;
private long userID;
private Set <Course> coursesCreated;
private Set <Course> coursesEnrolled;
private Set <Test> testsCreated;
private Set <Test> testsTaken;
/**
* Gets the analysis unique identifier.
* This field is used as primary key for persistence.
* @return analysis unique identifier
*/
@Id
public String getEmail()
{
return email;
}
/**
* Sets the analysis unique identifier
* @param id unique identifier to set
*/
public void setEmail(String email)
{
this.email = email;
}
/** Password */
public String getPassword()
{
return password;
}
public void setPassword(String email)
{
this.password = password;
}
/** Name of the user */
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
/** Surname of the user */
public String getSurname()
{
return surname;
}
public void setSurname(String surname)
{
this.surname = surname;
}
/** Role of the user 1-Trainer, 2-Trainee, 3-Assistant*/
public int getRole()
{
return role;
}
public void setRole(int role)
{
this.role = role;
}
/** Role of the user 1-Trainer, 2-Trainee, 3-Assistant*/
public long getUserID()
{
return userID;
}
public void setUserID(long userID)
{
this.userID = userID;
}} |
But I do not see any table named "lessonuser" created in the "lessonds" database.
Can someone point out if I am going wrong somewhere ?
Thanks in advance ..
Guru
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580992#580992]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[JBoss Web Services] - Problems with missing minOccurs=" 1" in generated wsdl
by Mats Ekström
Mats Ekström [http://community.jboss.org/people/fghj5678] created the discussion
"Problems with missing minOccurs="1" in generated wsdl"
To view the discussion, visit: http://community.jboss.org/message/561764#561764
--------------------------------------------------------------
Hi!
We are using jboss soa platform 4.3.0 CP02 and when I annotate like this:
@XmlElement(nillable=false, required=true)
public void setProducer(String producer) {
public void setProducer(String producer) {
this.producer = producer;
}
this.producer = producer;
}In the generated wsdl (from the deploy), the element producer will look like this:
<xs:element name="producer" type="xs:string"/>
Where is the minOccurs="1"???
If I instead annotate at declaration of producer I get an exception:
@XmlElement(nillable=false, required=true)
private String producer;
java.lang.IllegalStateException: Cannot build JAXB context
...
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "producer"
this problem is related to the following location:
at public java.lang.String se.tullverket.texi.archive.bl.Trans.getProducer()
at se.tullverket.texi.archive.bl.Trans
at public se.tullverket.texi.archive.bl.Trans se.tullverket.texi.archive.bl.ArchiveTO.getTrans()
at se.tullverket.texi.archive.bl.ArchiveTO
at private se.tullverket.texi.archive.bl.ArchiveTO se.tullverket.texi.archive.bl.jaxws.Archive.arg0
at se.tullverket.texi.archive.bl.jaxws.Archive
this problem is related to the following location:
at private java.lang.String se.tullverket.texi.archive.bl.Trans.producer
And if I skip the annotation it looks like this:
<xs:element minOccurs="0" name="producer" type="xs:string"/>
Any ideas?
/Mats
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561764#561764]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[jBPM] - Re: JBPM 3.2.5, MSSQL 2005 - blocking in JBPM_JOB table
by Alejandro Guizar
Alejandro Guizar [http://community.jboss.org/people/alex.guizar%40jboss.com] created the discussion
"Re: JBPM 3.2.5,MSSQL 2005 - blocking in JBPM_JOB table"
To view the discussion, visit: http://community.jboss.org/message/563437#563437
--------------------------------------------------------------
> Looking at how the jbpm_job table is utilized, yes, I think these specific indexes can be removed. Just to clarify. From what I have seen in *our use-case*, under normal circumstances the jbpm_job table has very few entries at any point in time. Seems like entries are added and removed constantly. That being the case, I'm not sure I can see a benefit of spending the extra time/resources maintaining indexes which are never utilized.
I'm going to explore the possibility of removing the job indexes. Can you please https://jira.jboss.org/browse/JBPM create a JIRA issue for this?
> By the way, this is as good a time to explain the use-case that is failing for us. We have a workflow with three steps synchronous steps. The first step takes a couple to a few hundred milliseconds to complete, the second step can take anywhere from 5 to 30 seconds to complete and then the last step usually takes a half a second. When I mentioned jobs earlier, I was referring to workflows contained the three steps just mentioned.
If possible, could you attach your workflow and test harness to the JIRA issue? Please remove any sensitive information you would not like to see published.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563437#563437]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[jBPM] - jBPM5 Console Integration with Tomcat6
by bpmn2 user
bpmn2user [http://community.jboss.org/people/bpmn2user] created the discussion
"jBPM5 Console Integration with Tomcat6"
To view the discussion, visit: http://community.jboss.org/message/578103#578103
--------------------------------------------------------------
Here are the required steps to get the jBPM5 console running in Tomcat6
1.) Copy the console war files provided in JBPM_INSTALLER/lib into Tomcat’s webapps directory
These war files can also be downloaded from ( http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.0-CR1/jbpm-5.0... http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.0-CR1/jbpm-5.0...). This download has two war files jbpm-gwt-console-5.0-CR1.war and jbpm-gwt-console-server-5.0-CR1.war. Rename them to jbpm-console.war and gwt-console-server.war and copy them to TOMCAT_HOME/webapps
2.) Create users and roles in TOMCAT_HOME/conf/tomcat-users.xml.
Here is an example
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="user"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="manager" password="manager" roles="manager"/>
<user username="krisv" password="krisv" roles="manager,admin,user"/>
<user username="john" password="john" roles="manager,admin,user"/>
<user username="mary" password="mary" roles="manager,admin,user"/>
</tomcat-users>
3.) Set the jbpm.console.directory in Catalina.bat (.sh)
Here is an example.
.. -Djbpm.console.directory=C:/jbpm5/CR1/jbpm-installer/sample/evaluation/src/main/resources ..
4.) Copy JBPM_INSTALLER\jboss-4.2.3.GA server\default\data\birt into TOMCAT_HOME\birt. This will provide the reporting functionality
5.) Copy the database driver (e.g., h2.jar) and all the dependant jar files into TOMCAT_HOME/lib.
Here are the required libraries:
jbpm-persistence-jpa-5.0-CR1.jar
h2-1.2.124.jar
persistence-api-1.0.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar
javassist-3.4.GA.jar
hibernate-entitymanager-3.4.0.GA.jar
hibernate-core-3.3.0.SP1.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate-annotations-3.4.0.GA.jar
ejb3-persistence-1.0.2.GA.jar
dom4j-1.6.1.jar
commons-collections-3.1.jar
antlr-2.7.6.jar
6.) Start database:
e.g, run ‘ant h2.start’ from JBPM_INSTALLER directory
7.) Start human task, e.g., run ‘ant start.human.task’ from JBPM_INSTALLER directory
This assumes that a datasource JNDI (jdbc/testDS1) is configured in Tomcat and a transaction manager (such as Bitronix or JOTM or Atomikos etc) is configured on Tomcat.
Refer to http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html for JNDI configuration on Tomcat6.
Login to console http://localhost:8080/jbpm-console http://localhost:8080/jbpm-console (krisv/krisv)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578103#578103]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[JBoss Messaging] - ConcurrentModificationException at ChannelSupport.deliverInternal
by Markus Lutum
Markus Lutum [http://community.jboss.org/people/mclu] created the discussion
"ConcurrentModificationException at ChannelSupport.deliverInternal"
To view the discussion, visit: http://community.jboss.org/message/580205#580205
--------------------------------------------------------------
Hi out there.
We are using Messaging 1.4.5 GA and got twice this error in production at 2 different systems:
Any ideas about the problem? Should we update to 1.4.7?
It could be that we had a short network issue on that machine but application and database is on the same machine.
Also I whould not expect a concurrentModificationException if this happens. It the network the root cause and what happens with the system if this happend?
THX
Markus
15:36:11,000 WARN [org.jboss.jms.server.endpoint.ServerSessionEndpoint] No expiry queue has been configured so removing expired
Reference[23298596871307270]:RELIABLE
15:36:11,015 WARN [org.jboss.jms.server.endpoint.ServerSessionEndpoint] No expiry queue has been configured so removing expired
Reference[23298608005775380]:RELIABLE
15:36:11,015 WARN [org.jboss.jms.server.endpoint.ServerSessionEndpoint] No expiry queue has been configured so removing expired
Reference[23298608312483861]:RELIABLE
15:36:11,031 ERROR [org.jboss.messaging.core.impl.ChannelSupport] Queue[26556037/1/2-notifications_mediumretry] Failed to deliver
java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
at java.util.LinkedList$ListItr.remove(Unknown Source)
at
org.jboss.messaging.util.prioritylinkedlist.BasicPriorityLinkedList$PriorityLinkedListIterator.remove(BasicPriorityLinkedList.java:295)
at
org.jboss.messaging.core.impl.ChannelSupport.deliverInternal(ChannelSupport.java:729)
at
org.jboss.messaging.core.impl.MessagingQueue.deliverInternal(MessagingQueue.java:506)
at
org.jboss.messaging.core.impl.ChannelSupport.acknowledgeInternal(ChannelSupport.java:844)
at
org.jboss.messaging.core.impl.ChannelSupport.acknowledge(ChannelSupport.java:290)
at
org.jboss.messaging.core.impl.SimpleDelivery.acknowledge(SimpleDelivery.java:103)
at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.expireDelivery(ServerSessionEndpoint.java:1109)
at
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.handle(ServerConsumerEndpoint.java:236)
at
org.jboss.messaging.core.impl.RoundRobinDistributor.handle(RoundRobinDistributor.java:119)
at
org.jboss.messaging.core.impl.MessagingQueue$DistributorWrapper.handle(MessagingQueue.java:583)
at
org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.handle(ClusterRoundRobinDistributor.java:79)
at
org.jboss.messaging.core.impl.ChannelSupport.deliverInternal(ChannelSupport.java:665)
at
org.jboss.messaging.core.impl.MessagingQueue.deliverInternal(MessagingQueue.java:506)
at
org.jboss.messaging.core.impl.ChannelSupport.acknowledgeInternal(ChannelSupport.java:844)
at
org.jboss.messaging.core.impl.ChannelSupport.acknowledge(ChannelSupport.java:290)
at
org.jboss.messaging.core.impl.SimpleDelivery.acknowledge(SimpleDelivery.java:103)
at
org.jboss.jms.server.endpoint.ServerSessionEndpoint.expireDelivery(ServerSessionEndpoint.java:1109)
at
org.jboss.jms.server.endpoint.ServerConsumerEndpoint.handle(ServerConsumerEndpoint.java:236)
at
org.jboss.messaging.core.impl.RoundRobinDistributor.handle(RoundRobinDistributor.java:119)
at
org.jboss.messaging.core.impl.MessagingQueue$DistributorWrapper.handle(MessagingQueue.java:583)
at
org.jboss.messaging.core.impl.ClusterRoundRobinDistributor.handle(ClusterRoundRobinDistributor.java:79)
at
org.jboss.messaging.core.impl.ChannelSupport.deliverScheduled(ChannelSupport.java:763)
at
org.jboss.messaging.core.impl.ChannelSupport$DeliverRefTimeoutTarget.timedOut(ChannelSupport.java:1151)
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:756)
at java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580205#580205]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month