Migrating a WebLogic EJB Application to JBoss
by Deepak Vohra03/09/2005
WebLogic server is a leading commercial application server. But for small scale developers, the open source, standards-based, application server JBoss is a viable alternative to commercial application servers such as WebLogic or WebSphere. Unfortunately, an application developed in WebLogic is not deployable in JBoss. JBoss Migration Services offers support to migrate an application to JBoss. As an alternative, an application may be migrated to JBoss by converting the vendor-specific deployment descriptors to JBoss. To demonstrate the migration of applications to JBoss, we shall migrate an EJB application developed in WebLogic with the Oracle database to the JBoss application server with the open source MySQL as the database.
This tutorial has the following sections:
- Preliminary Setup
- Overview
- Configuring JBoss with MySQL
- Converting the WebLogic EJB Application
- Deploying the EJB Application in JBoss
Preliminary Setup
The MySQL database driver classes are required to configure a JDBC connection with the MySQL database.
- Download the MySQL JDBC driver .jar file.
- Download and install the MySQL database server.
- Download and install the JBoss 4.0 application server.
Develop a Java application, which shall be used to transform the WebLogic deployment descriptors to JBoss deployment descriptors with an XSLT. The deployment descriptors may also be transformed with an XSLT utility.
Overview
Without modifications, an application developed for WebLogic does not deploy in JBoss. The deployment descriptors for the JBoss application server are different than the WebLogic deployment descriptors. In this tutorial, we shall migrate an example entity EJB application developed in WebLogic to JBoss by converting the WebLogic deployment descriptors to JBoss deployment descriptors.
|
Related Reading
Enterprise JavaBeans |
The example application consists of a Catalog entity EJB. The EJB's bean class (CatalogBean.java), remote interface (Catalog.java), and home interface (CatalogHome.java) are available in the weblogic-jboss-resources.zip example file listed in the Resources section below. The MySQL open source database shall be used to configure the JBoss application. The entity EJB classes do not need to be modified for deploying a WebLogic EJB application to JBoss. Only the deployment descriptors for an EJB must be modified.
Configuring JBoss with MySQL
MySQL is an open source database suitable for open source projects and small organizations. The following modifications are needed to configure JBoss with the MySQL database.
Configuring the JBoss Classpath
To use JBoss 4.0 with MySQL, we first copy the driver class .jar file mysql-connector-java-3.0.9-stable-bin.jar to the <JBoss>/server/default/lib directory. <JBoss> is the directory in which the JBoss application server is installed. The lib directory .jar and .zip files are in the Classpath of the JBoss server.
Configuring the MySQL Datasource
To use the MySQL data source, copy <JBoss>/docs/examples/jca/mysql-ds.xml to the <JBoss>/server/default/deploy directory. The datasource configuration files in the deploy directory get deployed when the JBoss server is started. Modify the mysql-ds.xml configuration file as follows:
-
Set
<driver-class/>tocom.mysql.jdbc.Driverand<connection-url/>tojdbc:mysql://localhost/<database>, where<database>is the MySQL database. The<database>value may be set totest, the example database in MySQL. -
Specify the JNDI name of the datasource in the
jndi-nameelement. -
Specify the username and password for the connection with the MySQL database. By default, a password is not required for the
rootusername. - Specify the
type-mappingelement asmySQL. Thetype-mappingelements specify the database type mappings that are pre-defined in the standardjbosscmp-jdbc.xml deployment descriptor. For the MySQL database the type-mapping name ismySQL.
The modified mysql-ds.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost/test</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
A JDBC connection may be obtained from the datasource with the datasource JNDI name:
InitialContext initialContext = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource)
initialContext.lookup("java:/MySqlDS");
java.sql.Connection conn = ds.getConnection();
Configuring Login
Next, we modify the login-config.xml configuration file with MySQL database settings. The application policy MySqlDbRealm is required to log in to the MySQL database. Add the following <application-policy/> element to login-config.xml:
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name ="principal"></module-option>
<module-option name ="userName">root</module-option>
<module-option name ="password"></module-option>
<module-option name ="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=MySqlDS
</module-option>
</login-module>
</authentication>
</application-policy>
By modifying the mysql-ds.xml and login-config.xml files, the JBoss 4.0 server is configured to work with the MySQL database. In addition to the settings specified in the previous sections, additional modifications may be required to the JBoss deployment descriptors and the JBoss JDBC configuration files.
If the "create table" option is selected (by setting the create-table element in jbosscmp-jdbc.xml to true) for deploying CMP entity EJBs, and the primary key (or unique key) length for a MySQL table exceeds 500 bytes, the deployment of the application generates a SQL syntax error in the MySQL database. For the java.lang.String type CMP fields, the primary key (or unique key) length may be reduced by setting the sql-type for the java-type java.lang.String to a lower VARCHAR value for the mySQL type mapping in the standardjbosscmp-jdbc.xml deployment descriptor. Another possible problem involves the column-name element in the jbosscmp-jdbc.xml deployment descriptor. If a MySQL table column name is the same as a MySQL reserved word, an error gets produced upon deploying a J2EE application in JBoss. The fix is to set the column name to a value that is not a MySQL reserved word.
Converting the WebLogic EJB Application
Having set up JBoss to use MySQL, we now need to convert the WebLogic EJB application to a JBoss EJB application, which involves changing the deployment descriptors. A WebLogic entity EJB application consists of the EJB deployment descriptors (ejb-jar.xml, weblogic-ejb-jar.xml, and weblogic-cmp-rdbms-jar.xml), the bean class (CatalogBean.java), the remote interface (Catalog.java), and the home interface (CatalogHome.java). To deploy the entity EJB in the WebLogic server, an EJB .jar file is created; this EJB .jar file has the structure:
META-INF/
ejb-jar.xml
weblogic-ejb-jar.xml
weblogic-cmp-rdbms-jar.xml
CatalogBean.class
Catalog.class
CatalogHome.class
The structural and application assembly information for an EJB is specified in the deployment descriptors. Structural information includes specifying the EJB as a session EJB or an entity EJB. The application assembly information in the ejb-jar.xml deployment descriptor is specified in the assembly-descriptor element. The entity EJB deployment descriptors for WebLogic are ejb-jar.xml, weblogic-ejb-jar.xml, and weblogic-cmp-rdbms-jar.xml. The corresponding deployment descriptors for JBoss are ejb-jar.xml, jboss.xml, and jbosscmp-jdbc.xml. Converting between these files will be described below.
The ejb-jar.xml deployment descriptor is the same for WebLogic and JBoss, except for the multiplicity element. The multiplicity element in the ejb-jar.xml file for the JBoss server is required to be upper case; i.e., One or Many instead of one or many.
The ejb-jar.xml deployment descriptor for the example entity EJB is available in the sample code.
The example ejb-jar.xml defines an entity EJB with the EJB name "Catalog." The example EJB has the CMP fields catalogId, journal, and publisher. The primary key field is catalogId.
Converting weblogic-ejb-jar.xml to jboss.xml
The weblogic-ejb-jar.xml and jboss.xml deployment descriptors are vendor-specific deployment descriptors for EJBs. To deploy a WebLogic EJB application to the JBoss application server, convert the weblogic-ejb-jar.xml deployment descriptor to jboss.xml.
The root element in weblogic-ejb-jar.xml is weblogic-ejb-jar. The root element in jboss.xml is jboss. The JNDI name for a EJB is specified in the jboss.xml and weblogic-ejb-jar.xml deployment descriptors with the jndi-name element or the local-jndi-name element. A weblogic-ejb-jar.xml deployment descriptor for the example entity EJB is available in the sample code. The DOCTYPE element for the weblogic-ejb-jar.xml deployment descriptor is:
<!DOCTYPE weblogic-ejb-jar PUBLIC
"-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd" >
The DOCTYPE for the jboss.xml deployment descriptor is:
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
Convert the deployment descriptor weblogic-ejb-jar.xml to the deployment descriptor jboss.xml with a custom XSLT stylesheet, jboss.xslt, available in the resource code .zip file. For further details about converting with XSLT, refer to Sun's XSLT tutorial.
The stylesheet creates jboss.xml, the JBoss equivalent of WebLogic's weblogic-ejb-jar.xml deployment descriptor. The jboss.xml file generated with the jboss.xslt stylesheet is available in the sample code.
Converting weblogic-cmp-rdbms-jar.xml to jbosscmp-jdbc.xml
The weblogic-cmp-rdbms-jar.xml deployment specifies the database persistence information for a CMP entity EJB. The weblogic-cmp-rdbms-jar.xml file includes the table name for a entity EJB, the datasource to connect to the database, and the columns corresponding to the entity EJB CMP fields. The weblogic-cmp-rdbms-jar.xml deployment descriptor for the example entity EJB is available in the .zip file. The JBoss deployment descriptor that specifies the CMP entity EJB persistence information is jbosscmp-jdbc.xml.
The root element of weblogic-cmp-rdbms-jar.xml is weblogic-rdbms-jar. The root element in jbosscmp-jdbc.xml is jbosscmp-jdbc. The data-source-name element, which specifies the data source to connect to the database in the weblogic-cmp-rdbms-jar.xml file, is equivalent to the datasource element in the jbosscmp-jdbc.xml deployment descriptor. The field-map element, which specifies the mapping of the entity EJB CMP fields to database table columns in weblogic-cmp-rdbms-jar.xml, is the equivalent of the cmp-field element in jbosscmp-jdbc.xml. The dbms-column element, which specifies a column name in weblogic-cmp-rdbms-jar.xml, is the equivalent of the column-name element in jbosscmp-jdbc.xml. The DOCTYPE for the weblogic-cmp-rdbms-jar.xml deployment descriptor is:
<!DOCTYPE weblogic-rdbms-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms20-persistence-810.dtd'>
The DOCTYPE for jbosscmp-jdbc.xml is:
<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">
Convert the deployment descriptor weblogic-cmp-rdbms-jar.xml to jbosscmp-jdbc.xml with the custom XSLT stylesheet, jbosscmp-jdbc.xslt, available in the sample code. The stylesheet creates jbosscmp-jdbc.xml, the JBoss equivalent of WebLogic's weblogic-cmp-rdbms-jar.xml deployment descriptor. jbosscmp-jdbc.xml is available in the .zip file.
The DTDs for the WebLogic deployment descriptors are different from the JBoss deployment descriptors. With custom XSLTs, which may be modified if additional elements are present in the deployment descriptors, the WebLogic deployment descriptors get converted to JBoss deployment descriptors. In the following section, the EJB application is deployed in the JBoss server.
Deploying the EJB Application in JBoss
Having converted the WebLogic EJB deployment descriptors to JBoss deployment descriptors, you need to create an EJB .jar file to deploy in the JBoss server. The structure of the JBoss .jar file is:
META-INF/
ejb-jar.xml
jboss.xml
jbosscmp-jdbc.xml
CatalogBean.class
Catalog.class
CatalogHome.class
Compile the example EJB classes and interfaces.
java Catalog.java CatalogBean.java CatalogHome.java
Copy the JBoss deployment descriptors, ejb-jar.xml, jboss.xml, and jbosscmp-jdbc.xml, to the META-INF directory. Create a .jar file from the JBoss deployment descriptors, classes, and interfaces with the jar utility.
jar cf CatalogEJB.jar CatalogBean.class
Catalog.class CatalogHome.class META-INF/*.xml
To deploy the JBoss entity EJB application, copy the .jar file, EntityEJB.jar, to the <JBoss>\server\default\deploy directory, where <JBoss> is the directory in which JBoss is installed.
The EJB application gets deployed on the JBoss server when the server is started.
The deploy directory in the JBoss application server is the directory that corresponds to the applications directory in the WebLogic application server.
Conclusion
An entity EJB application developed in WebLogic may be migrated to the JBoss application server by converting the deployment descriptors. Using a similar process, a WebLogic J2EE web application may be migrated to JBoss by converting the weblogic.xml deployment descriptor to jboss-web.xml.
Resources
- Sample code for this article
- JBoss application server
- MySQL database
- JBoss migration services
Deepak Vohra is a NuBean consultant and a web developer.
Return to ONJava.com.
Showing messages 1 through 20 of 20.
-
migrating from weblogic8.1 to jboss 4.0.5
2007-04-21 23:08:03 andybang [Reply | View]
-
migrating from weblogic8.1 to jboss 4.0.5
2007-04-22 07:25:35 Deepak Vohra [Reply | View]
classDefNotFoundException
Which class is not found?
-
deployment-descriptors
2007-02-21 05:31:38 Pete7 [Reply | View]
So if I unterstood it correct, jboss will need
-jboss.xml
-jboss-web.xml
-jbosscmp-jdbc.xml
-ejb-jar.xml
-web.xml
Is there anything else? -
deployment-descriptors
2007-02-21 07:19:55 Deepak Vohra [Reply | View]
ejb-jar.xml, jboss.xml and jbosscmp-jdbc.xml
are EJB deployment descriptors. jboss-web.xml and
web.xml are web application deployment descriptors. Another deployment descriptor for EJBs is jaws.xml.
-
migrate web, ejb application from weblogic to jboss
2006-11-23 13:29:00 NashRack1 [Reply | View]
This site has additional information that can supplement the information given in this article-
http://www.techpillar.com/mig_top.html
-
Problems converting
2005-12-06 07:02:04 cempaka8 [Reply | View]
I followed the step by step converting my weblogic 8.1 ejb app to jboss 4.02. It is a very simple app but I am getting errors. Since my entities local entities, I used the <local-jndi> tag.
Errors while deploying include
09:49:11,910 WARN [verifier] EJB spec violation:
Bean : PersonEntity
Method : public Integer ejbCreate(PersonValue) throws SQLException
Section: 10.6.4
Warning: The throws clause must define the javax.ejb.CreateException.
09:49:11,941 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-4.0.2/server/default/tmp/deploy/tmp614Mace.ear-contents/maceJ.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:418)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
at org.jboss.Main.boot(Main.java:195)
at org.jboss.Main$1.run(Main.java:463)
at java.lang.Thread.run(Thread.java:534)
09:49:11,941 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-4.0.2/server/default/deploy/Mace.ear
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:418)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
at org.jboss.Main.boot(Main.java:195)
at org.jboss.Main$1.run(Main.java:463)
at java.lang.Thread.run(Thread.java:534)
09:49:11,957 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@fd6ffd9c { url=file:/D:/jboss-4.0.2/server/default/deploy/Mace.ear }
deployer: org.jboss.deployment.EARDeployer@18a6e6e
status: Deployment FAILED reason: Verification of Enterprise Beans failed, see
above for error messages.
state: FAILED
watch: file:/D:/jboss-4.0.2/server/default/deploy/Mace.ear
altDD: null
lastDeployed: 1133880551816
lastModified: 1133880540894
mbeans:
Not sure if you want me to package the ear and send to you (it is very small) or just cut and paste all the xmls
-
JDBC connection Pool and data sources
2005-08-29 15:16:34 prasanrr [Reply | View]
Hi
I am using JBoss 4.0.2 and Oracle 9.x. I am trying to migrate from weblogic to JBoss. I am trying to configure a few JDBC connection pools for an Oracle database and have the data sources use these connection pools. I ave been searching on the web but could not find any examples. I do see data source configuration examples, but not connection pool and how to make the data source use the connection pool. Hope you can help me.
Thank You -
JDBC connection Pool and data sources
2005-08-29 16:05:46 Deepak Vohra [Reply | View]
In JBoss the jdbc is configured in the datasource configuration file.
Refer
http://www.onjava.com/pub/a/onjava/2004/02/25/jbossjdbc.html#oracle -
JDBC connection Pool and data sources
2005-08-29 16:50:07 prasanrr [Reply | View]
I currently have the following in Oracle datasource configuration file
<datasources>
<local-tx-datasource>
<jndi-name>DataSource1</jndi-name>
<connection-url>jdbc:oracle:thin:@101.71.7.59:1521:db1</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>dbuser</user-name>
<password>dbuser</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<new-connection-sql>select sysdate from dual</new-connection-sql>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
I am assuming something close the following would confgure the connection pool:
<connection-factories>
<tx-connection-factory>
<jndi-name>Pool1</jndi-name>
<rar-name></rar-name>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<connection-url>101.71.7.59:1521:db</connection-url>
<min-pool-size>10</min-pool-size>
<max-pool-size>200</max-pool-size>
<idle-timeout-minutes>200</idle-timeout-minutes>
<user-name>dbuser</user-name>
<password>dbuser</password>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</tx-connection-factory>
</connection-factories>
I am clear as to what would be RAR name and other tage and how it fits with the data source configuration. Just like in Weblogic, there does not seem to be a Pool-name tag for data source configuration.
Thank you for your help.
-
Simple case
2005-04-08 04:59:03 ejboy [Reply | View]
This article covers the simplest problems when migrating from Weblogic to JBoss. First of all provided XSLT styles are very poor. They don't cover many important aspects of migration, e.g. CMP-beans mappings, pool configurations etc.
JMS migration should be covered too because of several important differences between JBoss and Weblogic. -
Simple case
2005-04-08 05:20:45 Deepak Vohra [Reply | View]
The XSLts may be customized if additional elements are present in the deployment descriptors, as mentioned in the article.
Please post the weblogic deployment descriptors which you would like to migrate to JBoss. -
Simple case
2005-11-08 08:01:39 nirmalsingh [Reply | View]
Deepak,
I want to convert my weblogic.xml to jboss-web.xml. I need jboss-web.xslt to achieve the same.I am attaching my weblogic.xml below.
Can you provide me the same.
Thanks,
Nirmal
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<security-role-assignment>
<role-name>AMCAdmin</role-name>
<principal-name>AMCAdmin</principal-name>
</security-role-assignment>
<security-role-assignment>
<role-name>AMCUser</role-name>
<principal-name>AMCUser</principal-name>
</security-role-assignment>
<security-role-assignment>
<role-name>DDBUser</role-name>
<principal-name>DDBUser</principal-name>
</security-role-assignment>
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>3600</param-value>
</session-param>
<session-param>
<param-name>InvalidationIntervalSecs</param-name>
<param-value>3600</param-value>
</session-param>
<session-param>
<param-name>PersistentStoreType</param-name>
<param-value>replicated_if_clustered</param-value>
</session-param>
<session-param>
<param-name>CacheSize</param-name>
<param-value>256</param-value>
</session-param>
<session-param>
<param-name>PersistentStoreDir</param-name>
<param-value>session_db</param-value>
</session-param>
<session-param>
<param-name>JDBCConnectionTimeoutSecs</param-name>
<param-value>120</param-value>
</session-param>
<session-param>
<param-name>PersistentStoreCookieName</param-name>
<param-value>WLCOOKIE</param-value>
</session-param>
<session-param>
<param-name>IDLength</param-name>
<param-value>52</param-value>
</session-param>
<session-param>
<param-name>CookieMaxAgeSecs</param-name>
<param-value>-1</param-value>
</session-param>
<session-param>
<param-name>CookieComment</param-name>
<param-value>WebLogic Server Session Tracking Cookie</param-value>
</session-param>
<session-param>
<param-name>CookieName</param-name>
<param-value>JSESSIONID</param-value>
</session-param>
<session-param>
<param-name>TrackingEnabled</param-name>
<param-value>true</param-value>
</session-param>
<session-param>
<param-name>CookiesEnabled</param-name>
<param-value>true</param-value>
</session-param>
<session-param>
<param-name>URLRewritingEnabled</param-name>
<param-value>true</param-value>
</session-param>
</session-descriptor>
<jsp-descriptor>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>precompile</param-name>
<param-value>false</param-value>
</jsp-param>
<jsp-param>
<param-name>pageCheckSeconds</param-name>
<param-value>-1</param-value>
</jsp-param>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>noTryBlocks</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>printNulls</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
<session-monitoring-enabled>true</session-monitoring-enabled>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<context-root>/</context-root>
</weblogic-web-app>
-
XDoclet
2005-03-17 19:53:55 srinip [Reply | View]
What do you think about using XDoclet to manage the deployment descriptors for the EJB components and creating the xml files (for WL or JBoss) dynamically? -
XDoclet
2005-03-18 04:52:52 Deepak Vohra [Reply | View]
XDoclet may be used to generate JBoss or WebLogic deployment descriptors. XDoclet does not have the provision to convert WebLogic descriptors to JBoss descriptors.
-
WebLogic 8.1
2005-03-17 06:23:31 Deepak Vohra [Reply | View]
The XSLTs which are provided are for the WebLogic 8.1 version. For previous versions of WebLogic the XSLTs would be different. -
WebLogic 8.1
2006-08-14 00:19:33 myhue [Reply | View]
For conversion from WLS 6.1, what will be the different in the XSLT? Can you provide a example xslt template for jboss.xslt and jboss-web.xslt?
-
WebLogic 8.1
2006-08-14 06:40:22 Deepak Vohra [Reply | View]
Use the same XSLT for conversion from WLS 6.1.





Thanks
andy