[jBPM] - JBPM Persistence in Standalone J2SE APP
by David C
David C [http://community.jboss.org/people/process15] created the discussion
"JBPM Persistence in Standalone J2SE APP"
To view the discussion, visit: http://community.jboss.org/message/637210#637210
--------------------------------------------------------------
Hi
I'm running into a very pecuilar problem. I have no problem running my application with JBPM with persistence in my Eclipse IDE enviroment as a standalone app. However, when I export it into a runnable jar, I get this error:
javax.persistence.PersistenceException: Unable to configure EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:378)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32)
This is after I've removed the following jar since I get other set of errors if I include these 2 jars in my standalone jar executable
ejb3-persistence-1.0.2-GA.jar
persistence-api-1.0.jar
Any suggestions ?
Dave
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637210#637210]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[Beginner's Corner] - Datasource specification in web.xml
by Jan Vrtiska
Jan Vrtiska [http://community.jboss.org/people/xjohnx] created the discussion
"Datasource specification in web.xml"
To view the discussion, visit: http://community.jboss.org/message/636933#636933
--------------------------------------------------------------
Hi,
I have my project application which has been connecting to one simple datasource(which was defined in jbos-web.xml). Now I need to build form my application two *.war files and each of them will use different datasource. Since Im using ant, I can change in my build.xml file destination of web.xml file. So I have two web.xml files with different datasource deffinitions.
The problem is, that my solition is not working. After triing to reach my appplication i get error:
*javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: jdbc not bound]*
web.xml
<resource-ref>
<res-ref-name>DataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<mapped-name>DataSource</mapped-name>
</resource-ref>
adpartner-ds.xml
<local-tx-datasource>
<jndi-name>DataSource</jndi-name>
.....
java code:
InitialContext ctx = null;
try {
ctx = new InitialContext();
dataSource = (DataSource) ctx.lookup("java:comp/env/DataSource");
LOG.info("lookup na datasource");
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.daoFactory = new DaoFactory(this.dataSource);
I've tried to search solution on web but without any success.
Thanks for any help.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/636933#636933]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[jBPM] - New JBPM5-Module for JBoss 7
by Markus Dahm
Markus Dahm [http://community.jboss.org/people/dahm] created the discussion
"New JBPM5-Module for JBoss 7"
To view the discussion, visit: http://community.jboss.org/message/636802#636802
--------------------------------------------------------------
Hi,
we'd like to use JBPM 5.1 in our project that is developed for JBoss 7.
However we currently face two major deficiencies (never mind :p ):
- JPA2 is not supported
- There is some hard-coded persistence.xml in the jbpm-human-task JAR
This has been discussed in depth elsewhere. We were looking for solutions...
Our approach is to create a JBPM module for JBoss 7 which may be added to your server's configuration.
In my point of view this has the advantage that we can use JBPM as a service and do
not have to add all dependencies to all of our deployment units. Furthermore we want to avoid version conflicts
between the JAR versions used in JBoss 7 and JBPM 5.
The module uses a slightly patched version of the JBPM entity classes, i.e. they are modified to support JPA2
(which in fact was no big deal). Secondly we removed the persistence.xml file from the JAR.
The module bundles all absolutely necessary dependencies into on place.
The other dependencies - to Hibernate in particular - are resolved by configuration, since they already come for free
with JBoss 7.
If there is a bug fix or if we want to upgrade to - say - JBPM 5.2.Final this is just a matter of server configuration, i.e. updating the module.
The application development should remain unaffected.
I commited a first (cumbersome) version to
https://github.com/akquinet/jboss-as7-jbpm-module https://github.com/akquinet/jboss-as7-jbpm-module
Any feedback will be welcome...
Cheers
Markus
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/636802#636802]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[JBoss Messaging] - java.lang.NoSuchMethodError: org.jboss.remoting.Client.connect(Lorg/jboss/remoting/ConnectionListener; Ljava/util/Map; )
by Ankit Goel
Ankit Goel [http://community.jboss.org/people/ankgoel] created the discussion
"java.lang.NoSuchMethodError: org.jboss.remoting.Client.connect(Lorg/jboss/remoting/ConnectionListener;Ljava/util/Map;)"
To view the discussion, visit: http://community.jboss.org/message/636999#636999
--------------------------------------------------------------
We have the following configuration -
JBoss version is 4.2.3 GA
JBoss messaging: 1.4.5 GA
Remoting version: 2.2.3
We are trying to consume JBoss JMS topic messages from Oracle iAS 10.1.3.5 using 3rd party configurations.
We included the JBoss jars into Oracle iAS library. And we get the following exception -
java.lang.NoSuchMethodError: org.jboss.remoting.Client.connect(Lorg/jboss/remoting/ConnectionListener;Ljava/util/Map;)V
at org.jboss.jms.client.remoting.JMSRemotingConnection$1.run(JMSRemotingConnection.java:374)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:368)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:165)
I looked at jboss-messaging-client.jar and jbossall-client.jar for the classes involved in above exception. It seems the method connect(Lorg/jboss/remoting/ConnectionListener;Ljava/util/Map) is not available in Client.class which JMSRemotingConnection is trying to invoke !
Is it an issue with JBoss jars not being compatible ?
Do we have standars set of JBoss messaging jars to be used for Oracle iAS 10g.
Thanks,
Ankit
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/636999#636999]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[Beginner's Corner] - log4j
by Red Militante
Red Militante [http://community.jboss.org/people/redmond007] created the discussion
"log4j"
To view the discussion, visit: http://community.jboss.org/message/637095#637095
--------------------------------------------------------------
I'm running into problems trying to add log4j logging to one of my classes. This is part of an application deployed in JBoss as7 7.0.0-Final.
I add the following lines to my class
import org.apache.log4j.Logger;
public class Requests extends LEServlet
{
private static final Logger logger = Logger.getLogger(Requests.class);
...
logger.info("data:" + ID + ":" + sessionLogID + ":" + queueID + ":" + uuid);
When I try to compile my code I get
[ERROR] /Users/red/Documents/hg/myappAnywhere-maven/src/main/java/com/mycompany/myapp/Requests.java:[27,23] package org.apache.log4j does not exist
[ERROR]
[ERROR] /Users/red/Documents/hg/myappAnywhere-maven/src/main/java/com/mycompany/myapp/Requests.java:[31,22] cannot find symbol
[ERROR] symbol : class Logger
[ERROR] location: class com.mycompany.myapp.Requests
I have a log4j.properties in my src/main/resources/META-INF folder
log4j.rootLogger=WARN, A1
# Or log only errors, even less verbose
# log4j.rootLogger=ERROR, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
and a log4j dependency in my MANIFEST.MF
Manifest-Version: 1.0
Dependencies: org.apache.log4j
Not sure why I'm getting these errors. Any advice welcome.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637095#637095]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[JBoss Messaging] - javax.jms.JMSSecurityException: User null is NOT authenticated
by Rajesh Kumar
Rajesh Kumar [http://community.jboss.org/people/jbossrulzz] created the discussion
"javax.jms.JMSSecurityException: User null is NOT authenticated"
To view the discussion, visit: http://community.jboss.org/message/637083#637083
--------------------------------------------------------------
I am getting the "User null is NOT authenticated" exception in JBoss after migrating from HSQLDB to Mysql for JBoss Messaging.
Configuration details:
JBoss Server 5.1 (4 node cluster)
Mysql 5.5
Heres what i did to migrate from HSQLDB to Mysql:
1. Copied the Mysql JDBC driver (mysql-connector-java-5.1.1.4-bin) to the lib folder of the nodes in JBoss.
2. Replacde the file hsqldb-ds.xml with mysql-ds.xml in the deploy folder in JBoss.
3. Replaced the file hsqldb-persistence-service.xml with mysqldb-persistence-service.xml in the messaging folder under deploy in JBoss.
4. Updated the file mysql-ds.xml to have the following:
<local-tx-datasource>
<jndi-name>defaultDS</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>icdt</user-name>
<password>icdt</password>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<min-pool-size>20</min-pool-size>
<max-pool-size>100</max-pool-size>
<security-domain>MySqlDbRealm</security-domain>
5. Uncommented the "guest=guest" entry in the messaging-users file.
6. Added the following in the login-config file present in jboss/conf folder:
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">uname</module-option>
<module-option name = "userName">uname</module-option>
<module-option name ="password">pwd</module-option>
<module-option name ="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
</login-module>
</authentication>
</application-policy>
7. Added a reference to the MySqlDbRealm in the mysql-ds file by adding the following:
+<security-domain>MySqlDbRealm</security-domain>+
+ 8. + Ensured that the <type-mapping>mySQL</type-mapping> property vale present in mysql-ds.xml file is the same as the <type-mapping> property in standardjbosscmp-jdbc.xml file.
I am guessing, i am missing some configuration which is causing the issue. Could someone educate me on what needs to be updated to fix this issue. I see a few people have the same issue, but was not able to find a concrete solution or a pointer to the root cause of the issue.
Thanks
Rajesh
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637083#637083]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years