[Datasource Configuration] - accessing custom created datasources in JBOSS 7.1
by Srinivas Reddy Bijjam
Srinivas Reddy Bijjam [https://community.jboss.org/people/srinivas.bijjam] created the discussion
"accessing custom created datasources in JBOSS 7.1"
To view the discussion, visit: https://community.jboss.org/message/761532#761532
--------------------------------------------------------------
Greetings of the day
Generally we define the datasource in standalone.xml and then we will use the same in the application code based on JNDI Name and this is working fine for me. But we have a peculiar functionality where in we create the custom datasources through our application and then create the datasource xml with custom names like oracle.Host_Name-ds.xml, sqlserver.Host_Name-ds.xml, mysql.Host_Name-ds.xml,oracle.Host_Name1-ds.xml etc etc and we use this datasources to connect
String dsName = oracle.Host_Name; try { javax.sql.DataSource ds = DataSourceHelper.getDataSource(dsName); conn = ds.getConnection(); }
in JBOSS 4.x we used to create these files on fly(through application) and store them in application server/server/default/deploy folder and we used to access the data source with out any problem.
In JBoss 7.X, how to bind the created datasources so that we will access them without change in the code. I don't want to change the code because there are so many instances where we are using it and also it will impact other functionality
Regards Srini
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/761532#761532]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[Datasource Configuration] - Deploying datasource via -ds.xml files in JBoss AS 7.1.1.Final
by Srinivas Reddy Bijjam
Srinivas Reddy Bijjam [https://community.jboss.org/people/srinivas.bijjam] created the discussion
"Deploying datasource via -ds.xml files in JBoss AS 7.1.1.Final"
To view the discussion, visit: https://community.jboss.org/message/762017#762017
--------------------------------------------------------------
Dear All
* I am getting the following error while looking up the datasource that was bounded by ds.xml file but it is working fine with the datasource that is defined in standalonefull.xml*
*+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.sql.DataSource+*
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at xxx.utils.DataSourceHelper.getDataSource(DataSourceHelper.java:31)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at java.lang.reflect.Method.invoke(Method.java:597)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:105)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:56)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:65)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)+
+22:53:08,609 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)+
+22:53:08,609 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)+
*java code to look up is*
|
| |
| Context ctx = new InitialContext(); |
|
| |
| return (javax.sql.DataSource) ctx.lookup("java:/"+dsName); |
*mydatasource-ds.xml*
<?xml version="1.0" encoding="UTF-8"?><datasources>
<xa-datasource enabled="true" jndi-name="java:/mydatasource" pool-name="mydatasource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</xa-datasource>
</datasources>
*standalonefull.xml content is*
<datasources>
<xa-datasource jndi-name="java:/xxx-oraclePool" pool-name="xxx-oraclePool" enabled="true" use-java-context="true">
<xa-datasource-property name="URL">
jdbc:oracle:thin:@localhost:1521:orcl
</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
</xa-datasource>
<drivers>
<driver name="ojdbc6" module="com.oracle.ojdbc6">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
*module.xml is*
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
What is the reason it is throwing error for ds.xml but working fine for standalone-full.xml?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/762017#762017]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Tools] - JBoss Tools: Hibernate Tools: LGPL and EPL license conflict in the same file
by Tapio Siilola
Tapio Siilola [https://community.jboss.org/people/esiilola] created the discussion
"JBoss Tools: Hibernate Tools: LGPL and EPL license conflict in the same file"
To view the discussion, visit: https://community.jboss.org/message/752204#752204
--------------------------------------------------------------
Hello
My perspective is that of a lawyer, so please excuse me for digging into old stuff - it merely comes with the job. :)
I'm tasked with analyzing Hibernate Tools, a part of JBoss Tools, to find out its licensing. In particular, the package I need to review is an "all sources" package of JBoss Tools available at: http://downloads.sourceforge.net/jboss/JBossTools-ALL-sources-3.0.3.v2009..., (http://downloads.sourceforge.net/jboss/JBossTools-ALL-sources-3.0.3.v2009... the /hibernatetools folder contains Hibernate Tools (v.3.2.4 I believe).
I understand this version of Hibernate Tools (without accounting for dependencies) is predominantly licensed with LGPL v.2.1 (or later), and parts are under Eclipse Public License 1.0. However, upon a cursory review I found two files (there may be more) which contain both the LGPL and EPL license headers. These files are:
hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/JFaceNodeAdapterFactoryForXML.java
hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator/ClearPlaceHolderJob.java
The EPL copyright holder is "IBM and others", while the LGPL copyright holder is JBoss. It seems to me this combination of two copyleft (albeit weak) licenses in one file may not be compatible.
For the vast majority of files in this package, when JBoss is a co-copyright owner in a file the file is distributed under the EPL license. Is this two licenses in a single file simply an oversight, and can the file be considered to be fully under one of the licenses? Or is there something else at play here, perhaps a different interpretation of the licenses, or a permission from the copyright holder? Our issue is simply wanting our forms of use/redistribution of the component to be compliant with whatever the license terms are. Here's the license header of the first file:
*/*******************************************************************************
* Copyright (c) 2001, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org http://www.fsf.org.
*/
*
Thank you in advance for your time and any possible replies.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/752204#752204]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[EJB3] - Remote EJB3 client deploy fail.
by Bob Kung
Bob Kung [https://community.jboss.org/people/r4_1314] created the discussion
"Remote EJB3 client deploy fail."
To view the discussion, visit: https://community.jboss.org/message/744203#744203
--------------------------------------------------------------
Hi all,
I have a war builds on spring jndi template to invoke ejbs which deployed on a remote Jboss as 7.1.0 server. And my deploy server also a jboss 7.1.0 server.
The jndi config is
"java.naming.factory.initial": "org.jboss.naming.remote.client.InitialContextFactory",
"java.naming.security.principal":"user",
"java.naming.security.credentials":"user",
"java.naming.provider.url": "remote://192.168.1.153:4447",
"jboss.naming.client.ejb.context": true
The first time I packed the war with a jboss-client-7.1.0.Final.jar, but I got the *linkage error of org/jboss/remoting/Connection*. So I removed that jar, deployed again. Another error appeared
(http--0.0.0.0-8080-1) javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.abc.war:main" from Service Module Loader
18:35:33,214 ERROR [stderr] (http--0.0.0.0-8080-1) javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.abc.war:main" from Service Module Loader
18:35:33,215 ERROR [stderr] (http--0.0.0.0-8080-1) at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)
18:35:33,225 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
18:35:33,226 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
18:35:33,226 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.InitialContext.init(InitialContext.java:240)
18:35:33,227 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.InitialContext.<init>(InitialContext.java:214)
18:35:33,227 ERROR [stderr] (http--0.0.0.0-8080-1) at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)
18:35:33,228 ERROR [stderr] (http--0.0.0.0-8080-1) at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103)
Any idea for this?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744203#744203]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - Human Task Service transactions fail
by Grigory Kalabin
Grigory Kalabin [https://community.jboss.org/people/gkalabin] created the discussion
"Human Task Service transactions fail"
To view the discussion, visit: https://community.jboss.org/message/762559#762559
--------------------------------------------------------------
Hi everybody!
I'm using jBPM 5.3.0.Final (except jbpm-human-task which version is 5.3.0.CR1, because something is wrong with my pom.xml or maven repo) and JBoss 7.1.1.
I'm trying to run jbpm with human task service.
When I start processes without human tasks everything works fine. But when I try to run process with human task I get the following exception (see full error log in attachments):
20:04:37,710 ERROR [stderr] (NioProcessor-4) Caused by: java.lang.NullPointerException
20:04:37,715 ERROR [stderr] (NioProcessor-4) at org.jbpm.task.service.persistence.TaskJTATransactionManager.getStatus(TaskJTATransactionManager.java:70)
20:04:37,726 ERROR [stderr] (NioProcessor-4) at org.jbpm.task.service.persistence.TaskJTATransactionManager.ownsTransaction(TaskJTATransactionManager.java:28)
20:04:37,737 ERROR [stderr] (NioProcessor-4) at org.jbpm.task.service.persistence.TaskPersistenceManager.beginTransaction(TaskPersistenceManager.java:50)
20:04:37,749 ERROR [stderr] (NioProcessor-4) at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:887)
20:04:37,754 ERROR [stderr] (NioProcessor-4) ... 28 more
I init HumanTaskService and jBPM like:
Environment JBPM_ENVIRONMENT = KnowledgeBaseFactory.newEnvironment();
JBPM_ENVIRONMENT.set(EnvironmentName.ENTITY_MANAGER_FACTORY, Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa"));
JBPM_ENVIRONMENT.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
JBPM_ENVIRONMENT.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
Properties properties = new Properties();
properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");
properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
KnowledgeSessionConfiguration JBPM_CONFIG = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
MinaTaskServer taskServer = new MinaTaskServer(taskService);
// start the server
Thread thread = new Thread(taskServer);
thread.start();
TaskClient taskClient = new TaskClient(new MinaTaskClientConnector("myHtsClient",
new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
if (!taskClient.connect(TASK_CLIENT_SERVER_ADDRESS, TASK_CLIENT_SERVER_PORT)) {
logger.error("Could not connect task client");
}
StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(readKnowledgeBase(), JBPM_CONFIG, JBPM_ENVIRONMENT);
session.getWorkItemManager().registerWorkItemHandler("Human Task", new CommandBasedWSHumanTaskHandler(session));
And my persistence.xml looks like:
<?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="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
<mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
</persistence-unit>
<persistence-unit name="org.jbpm.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
</persistence-unit>
</persistence>
Also I'm using custom TransactionManagerLookup class (it's specifyed in hibernate.properties):
public class TransactionManagerLookup extends JNDITransactionManagerLookup {
@Override
protected String getName() {
return "java:jboss/TransactionManager";
}
@Override
public String getUserTransactionName() {
return "java:comp/UserTransaction";
}
}
I even tried to rebind UserTransaction (which Task service looks up) to BitronixTransactionManager, but it not helps. I checked that there is UserTransaction object which TaskService looks up.
Thank you for your attention. Have a good day!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/762559#762559]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Tools] - Error when open SessionFacoty in Eclipse's Hibernate Perspective
by spring liao
spring liao [https://community.jboss.org/people/spring.liao] created the discussion
"Error when open SessionFacoty in Eclipse's Hibernate Perspective"
To view the discussion, visit: https://community.jboss.org/message/761046#761046
--------------------------------------------------------------
Hi,
Following is my application/development enviroment:
1.Eclipse 3.7.2/Indigo SR2
2.jboss tools 3.3.1.Final
3.hibernate-orm 4.1.7.Final
4.Joda Time 2.1
5.usertype 3.0.0.CR3
My domain class use joda time LocalDateTime type and UserType annotation:
@Column(name = "START")
@Type(type = "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime")
private org.joda.time.LocalDateTime start;
Both my application and development enviroment work properly except the only one issue:
When I open Hibernate Perspective in Eclipse then click SessionFactory to open it
, the following exception raised and failed to open.
I am not sure it is jboss tools or usertype problem ?
--------------------------------begin error log--------------------------------
!ENTRY org.hibernate.eclipse.console 4 4 2012-09-24 15:06:26.609
!MESSAGE Problems while creating sessionfactory
!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2012-09-24 15:06:26.609
!MESSAGE java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
!STACK 0
java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.jadira.usertype.spi.shared.AbstractSingleColumnUserType.<init>(AbstractSingleColumnUserType.java:41)
at org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime.<init>(PersistentLocalDateTime.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.type.CustomType.<init>(CustomType.java:75)
at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:301)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:282)
at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:143)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:68)
at org.hibernate.mapping.Component.buildType(Component.java:183)
at org.hibernate.mapping.Component.getType(Component.java:176)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.Collection.validate(Collection.java:301)
at org.hibernate.mapping.Set.validate(Set.java:42)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1197)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2012-09-24 15:06:26.625
!MESSAGE java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
!STACK 0
java.lang.VerifyError: (class: org/jadira/usertype/spi/shared/AbstractTimestampColumnMapper, method: getHibernateType signature: ()Lorg/hibernate/type/AbstractStandardBasicType;) Wrong return type in function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.jadira.usertype.spi.shared.AbstractSingleColumnUserType.<init>(AbstractSingleColumnUserType.java:41)
at org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime.<init>(PersistentLocalDateTime.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.type.CustomType.<init>(CustomType.java:75)
at org.hibernate.type.TypeFactory.heuristicType(TypeFactory.java:301)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:282)
at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:143)
at org.hibernate.tuple.component.ComponentMetamodel.<init>(ComponentMetamodel.java:68)
at org.hibernate.mapping.Component.buildType(Component.java:183)
at org.hibernate.mapping.Component.getType(Component.java:176)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:275)
at org.hibernate.mapping.Collection.validate(Collection.java:301)
at org.hibernate.mapping.Set.validate(Set.java:42)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1197)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1378)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.console.ConsoleConfiguration$5.execute(ConsoleConfiguration.java:278)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:273)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
---------------------------------end error log---------------------------------
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/761046#761046]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months