[Datasource Configuration] - Re: Local Tx Datasource is DOWN
by Mayur B
Mayur B [http://community.jboss.org/people/bingojava] created the discussion
"Re: Local Tx Datasource is DOWN"
To view the discussion, visit: http://community.jboss.org/message/568184#568184
--------------------------------------------------------------
Problem with putting proper XMl , so will give information what it contains :
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/mysql</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:mysql://<my.own.server.ip>:3306/database_name?zeroDateTimeBehavior=convertToNull</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>password</password>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
datasources
local-tx-datasource
jndi-name>----mysql---/jndi-name.
use-java-context : false use-java-contex .
connection-url : jdbc:mysql://my.own.server.i>:3306/database_name?zeroDateTimeBehavior=convertToNull.
driver-class: com.mysql.jdbc.Driver.
user-name root user-name
passworpassword password
valid-connection-checker-class-name org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker valid-connection-checker-class-name
metadata
type-mapping mySQL type-mapping>
metadata
local-tx-datasource
datasources
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568184#568184]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[JBoss Tools] - Re: Hibernate Tools does not support ElementCollection ?
by Brian Topping
Brian Topping [http://community.jboss.org/people/topping] created the discussion
"Re: Hibernate Tools does not support ElementCollection ?"
To view the discussion, visit: http://community.jboss.org/message/568908#568908
--------------------------------------------------------------
How about this one:
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: mauswerks] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 63 more
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: Address, for columns: [org.hibernate.mapping.Column(addressLines)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)
at org.hibernate.mapping.Property.isValid(Property.java:207)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 68 more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: xxx] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:225)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 63 more
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: Address, for columns: [org.hibernate.mapping.Column(addressLines)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:292)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)
at org.hibernate.mapping.Property.isValid(Property.java:207)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:66)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
... 68 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568908#568908]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[EJB 3.0] - Entity mapped to a view shows wrong Information
by Osvaldo González
Osvaldo González [http://community.jboss.org/people/DOLOS] created the discussion
"Entity mapped to a view shows wrong Information"
To view the discussion, visit: http://community.jboss.org/message/568898#568898
--------------------------------------------------------------
Hi everybody. I have made a view in my MySQL Database to fetch some data to present to the user, but when I try to retrieve the data from that view with an entity what I get is not the same that I can see in my database. Here is the code to the view:
DROP VIEW IF EXISTS `copladem`.`confdependencias`;
DROP VIEW IF EXISTS `copladem`.`confdependencias`;
CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `confdependencias`
AS select `configuraciones`.`Nombre` AS `Configuracion`,`dependencias`.`nombre` AS `Dependencia`,
if((count(`configuracionesdependencias`.`idConfiguracionesDependencias`) > 0),'SI','NO') AS `Existe`
from ((`dependencias` join `configuraciones` on((`configuraciones`.`idConfiguracion` =
`configuraciones`.`idConfiguracion`))) left join `configuracionesdependencias`
on(((`configuracionesdependencias`.`configuracion` = `configuraciones`.`idConfiguracion`)
and (`configuracionesdependencias`.`dependencia` = `dependencias`.`idDependencia`))))
group by `dependencias`.`nombre`,`configuraciones`.`Nombre` order by `configuraciones`.`Nombre`;
CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `confdependencias` AS select `configuraciones`.`Nombre` AS `Configuracion`,`dependencias`.`nombre` AS `Dependencia`,if((count(`configuracionesdependencias`.`idConfiguracionesDependencias`) > 0),'SI','NO') AS `Existe` from ((`dependencias` join `configuraciones` on((`configuraciones`.`idConfiguracion` = `configuraciones`.`idConfiguracion`))) left join `configuracionesdependencias` on(((`configuracionesdependencias`.`configuracion` = `configuraciones`.`idConfiguracion`) and (`configuracionesdependencias`.`dependencia` = `dependencias`.`idDependencia`)))) group by `dependencias`.`nombre`,`configuraciones`.`Nombre` order by `configuraciones`.`Nombre`;
With this view, executed in MySQL Query Browser, I get the follow:
http://community.jboss.org/servlet/JiveServlet/showImage/2-568898-10551/v... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-568898-105...
That's just what I want, so I generated an entity from this view using netbeans, it looks like this:
@Entity
@Table(name = "confdependencias")
@NamedQueries({
@NamedQuery(name = "Confdependencias.findAll", query = "SELECT c FROM Confdependencias c"),
@NamedQuery(name = "Confdependencias.findByConfiguracion", query = "SELECT c FROM Confdependencias c WHERE c.configuracion = :configuracion"),
@NamedQuery(name = "Confdependencias.findByDependencia", query = "SELECT c FROM Confdependencias c WHERE c.dependencia = :dependencia"),
@NamedQuery(name = "Confdependencias.findByExiste", query = "SELECT c FROM Confdependencias c WHERE c.existe = :existe")})
public class Confdependencias implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "Configuracion")
private String configuracion;
@Basic(optional = false)
@Column(name = "Dependencia")
private String dependencia;
@Basic(optional = false)
@Column(name = "Existe")
private String existe;
/*CONSTRUCTOR, GETTER's AND SETTER's*/
}
And then I Tried to get data using this:
Query q;
q = em.createNamedQuery("Confdependencias.findAll");
But when I see the q.getResultList() method, it returns a vector of Confdependencias objects with the follow data:
|| configuracion || dependencia || existe ||
| 2009 | Contraloría Municipal | SI |
| 2009 | Contraloría Municipal | SI |
| 2010 | Contraloría Municipal | SI |
| 2010 | Contraloría Municipal | SI |
As You can see, it's not the information that the view shows in the database, so, what I'm doing wrong? Thanks for your help
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568898#568898]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[jBPM] - Error while running demo.setup.jboss script
by Maciej K
Maciej K [http://community.jboss.org/people/kobier] created the discussion
"Error while running demo.setup.jboss script"
To view the discussion, visit: http://community.jboss.org/message/567032#567032
--------------------------------------------------------------
Hi.
I was trying to build install JBPM 4.4 using demo.setup.jboss script. I followed steps from User Guide, and I got exception while executing it:
BUILD FAILED
C:\Documents and Settings\Kobier\Pulpit\jbpm-4.4\install\build.xml:129: The foll
owing error occurred while executing this line:
C:\Documents and Settings\Kobier\Pulpit\jbpm-4.4\install\build.xml:757: The foll
owing error occurred while executing this line:
C:\Documents and Settings\Kobier\Pulpit\jbpm-4.4\install\build.xml:902: Error wh
ile expanding C:\Documents and Settings\Kobier\Pulpit\jbpm-4.4\install\downloads
\eclipse-java-galileo-SR2-win32.zip
java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(Native Method)
at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:
467)
I don't know what to do with this, and I would appreciate any advice. Thanks in advance!
PS. I'm using Windows XP, Java 6u21, JBPM 4.4 and Apache Ant 1.8.1
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/567032#567032]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[JBoss Cache] - JBoss cache configuration
by Andriy Samulyak
Andriy Samulyak [http://community.jboss.org/people/a.samulyak] created the discussion
"JBoss cache configuration"
To view the discussion, visit: http://community.jboss.org/message/568777#568777
--------------------------------------------------------------
Can ynyone help me with configuring jboss cache to store data in DB.
I added custom configuration to 'jboss-cache-manager-jboss-beans.xml':
<entry>
<key>custom-cache</key>
<value>
<bean name="WCCache" class="org.jboss.cache.config.Configuration">
<property name="nodeLockingScheme">PESSIMISTIC</property>
<property name="isolationLevel">REPEATABLE_READ</property>
<property name="cacheMode">REPL_ASYNC</property>
<property name="lockParentForChildInsertRemove">true</property>
<property name="lockAcquisitionTimeout">15000</property>
<property name="evictionConfig">
<bean class="org.jboss.cache.config.EvictionConfig">
<property name="wakeupInterval">5000</property>
<property name="defaultEvictionRegionConfig">
<bean class="org.jboss.cache.config.EvictionRegionConfig">
<property name="regionName">/</property>
<property name="evictionAlgorithmConfig">
<bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
<property name="maxNodes">10000</property>
<property name="timeToLive">0</property>
<property name="maxAge">0</property>
</bean>
</property>
</bean>
</property>
</bean>
</property>
<property name="cacheLoaderConfig">
<bean class="org.jboss.cache.config.CacheLoaderConfig">
<property name="passivation">true</property>
<property name="shared">false</property>
<property name="individualCacheLoaderConfigs">
<list>
<bean class="org.jboss.cache.loader.JDBCCacheLoaderConfig">
<property name="datasourceName">java:/DefaultDS</property>
<property name="nodeType">longblob</property>
<property name="async">false</property>
<property name="fetchPersistentState">true</property>
<property name="purgeOnStartup">false</property>
<property name="ignoreModifications">false</property>
</bean>
</list>
</property>
</bean>
</property>
</bean>
</value>
</entry>
the problem is that DataTource deploys after cache start, so while chache deploy I receive error that DS is not boud.
*Is there any way to make my cache configuration start after DS is delpoyed?*
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568777#568777]
Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[JBoss Messaging] - Re: Adjust / reduce MDB bean pool
by Alexander Hartner
Alexander Hartner [http://community.jboss.org/people/ejb3workshop] created the discussion
"Re: Adjust / reduce MDB bean pool"
To view the discussion, visit: http://community.jboss.org/message/568732#568732
--------------------------------------------------------------
Setting the pool to 14 and the timeout to 12500
{code}
@org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=14, timeout=12500)
{code}
I get the following exception:
[quote]
javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=12500
at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:122)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
at $Proxy155.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Thread.java:619)
javax.ejb.EJBException: Failed to acquire the pool semaphore, strictTimeout=12500
at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:122)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
at $Proxy155.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Thread.java:619)
[/quote]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568732#568732]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months