How to install i-net OPTA in |JBoss 2.0 FINAL and JBoss 2.1 PRE

Please note: You need the i-net OPTA v.2.05 fix or higher.

JBoss Server Configuration

  1. Copy the Opta.jar file to jboss $JBOSS_ROOT/lib/ext directory.
  2. Start JBoss and check if the Opta.jar file is loaded (at the very beginning a list of jar-files loaded appears).
  3. Add the JDBC driver class name com.inet.tds.TdsDriver in the file jboss.properties in the jdbc.drivers list. At has to looks like this:
    jdbc.drivers=org.hsql.jdbcDriver,
    org.enhydra.instantdb.jdbc.idbDriver,com.inet.tds.TdsDriver
  4. Start jBoss and check if the JDBC-driver has been found (look for it on the right side after the list of loaded jar-files)
  5. Add a <MLET> tag to the file jboss.conf, add the Opta.jar subsequently to the jboss.jar in this tag (everything within {} is to be replaced by your value including the {}). You should add this tag at the end of the file:
    <MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,Opta.jar"
    CODEBASE="../../lib/ext/">
        <ARG TYPE="java.lang.String" VALUE="{MyConnectionPool}">
        <ARG TYPE="java.lang.String" VALUE="com.inet.tds.DTCDataSource">
    </MLET>

    *** If you can't install the Resource Manager Proxy in the SQL Server then you can use com.inet.tds.XDataSource instead of com.inet.tds.DTCDataSource.

  6. Add a <mbean> tag the file jboss.jcml (everything within {} is to be replaced by your value including the {}):
    <mbean name="DefaultDomain:service=XADataSource,name={MyConnectionPool}">
        <attribute name="Properties">serverName={YourHost};
                                     database={YourDatabase}</attribute>
        <attribute name="GCMinIdleTime">1200000</attribute>
        <attribute name="JDBCUser">{sa}</attribute>
        <attribute name="MaxSize">10</attribute>
        <attribute name="Password">{}</attribute>
        <attribute name="GCEnabled">false</attribute>
        <attribute name="InvalidateOnError">false</attribute>
        <attribute name="TimestampUsed">false</attribute>
        <attribute name="Blocking">true</attribute>
        <attribute name="GCInterval">120000</attribute>
        <attribute name="IdleTimeout">1800000</attribute>
        <attribute name="IdleTimeoutEnabled">false</attribute>
        <attribute name="LoggingEnabled">false</attribute>
        <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
        <attribute name="MinSize">0</attribute>
    </mbean>
  7. Start jBoss and check if a new DataSource is loaded (count them if there is no output from the JDBC loading)

EJB Deployment

  1. Start EJX (java -jar ejx.jar within the /bin directory)
  2. Load your EJB jar file and select the JAWS.xml or create one
  3. Insert MyConnectionPool as the datasource name ( or the datasource name you specifed in step 5 above)
  4. Set the datatype mapping from the list MS SQLSERVER?

Problems with the Installation

java.lang.NullPointerException
    at org.jboss.logging.Log.log(Log.java:95)
    at org.jboss.logging.Log.log(Log.java:100)
    at org.jboss.util.ServiceMBeanSupport.init(ServiceMBeanSupport.java:62)
    at org.jboss.util.ServiceMBeanSupport.preRegister(ServiceMBeanSupport.java:161)
    at com.sun.management.jmx.MBeanServerImpl.preRegisterInvoker(MBeanServerImpl.java:2245)
    at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:765)
    at javax.management.loading.MLet.getMBeansFromURL(MLet.java:540)
    at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
    at org.jboss.Main.<init>(Main.java:119)
    at org.jboss.Main$1.run(Main.java:87)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.Main.main(Main.java:83)

Cause: You have to add the MLET tag to the top of the file and not at the end of the file.


[MyConnectionPool] com.inet.tds.SQLException: java.net.UnknownHostException: YourHost,database=YourDatabase
[MyConnectionPool] java.net.UnknownHostException: YourHost,database=YourDatabase
[MyConnectionPool]     at java.net.InetAddress.getAllByName0(Unknown Source)
[MyConnectionPool]     at java.net.InetAddress.getAllByName0(Unknown Source)
[MyConnectionPool]     at java.net.InetAddress.getByName(Unknown Source)
[MyConnectionPool]     at java.net.Socket.<init>(Unknown Source)
[MyConnectionPool]     at com.inet.tds.TdsDriver.a(Unknown Source)
[MyConnectionPool]     at com.inet.tds.TdsDriver.connect(Unknown Source)
[MyConnectionPool]     at com.inet.tds.TdsDataSource.getConnection(Unknown Source)
[MyConnectionPool]     at com.inet.tds.DTCDataSource.getXAConnection(Unknown Source)
[MyConnectionPool]     at org.jboss.minerva.factories.XAConnectionFactory.createObject(XAConnectionFactory.java:232)
[MyConnectionPool]     at org.jboss.minerva.pools.ObjectPool.createNewObject(ObjectPool.java:801)
[MyConnectionPool]     at org.jboss.minerva.pools.ObjectPool.getObject(ObjectPool.java:549)
[MyConnectionPool]     at org.jboss.minerva.datasource.XAPoolDataSource.getConnection(XAPoolDataSource.java:169)
[MyConnectionPool]     at org.jboss.jdbc.XADataSourceLoader.initializePool(XADataSourceLoader.java:288)
[MyConnectionPool]     at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:252)
[MyConnectionPool]     at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:92)
[MyConnectionPool]     at java.lang.reflect.Method.invoke(Native Method)
[MyConnectionPool]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[MyConnectionPool]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[MyConnectionPool]     at org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:284)
[MyConnectionPool]     at org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:261)
[MyConnectionPool]     at org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:243)
[MyConnectionPool]     at org.jboss.dependencies.DependencyManager.processService(DependencyManager.java:238)
[MyConnectionPool]     at org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:117)
[MyConnectionPool]     at org.jboss.Main.<init>(Main.java:162)
[MyConnectionPool]     at org.jboss.Main$1.run(Main.java:87)
[MyConnectionPool]     at java.security.AccessController.doPrivileged(Native Method)
[MyConnectionPool]     at org.jboss.Main.main(Main.java:83)

Cause: The properties need to be separated by semicolon and not by comma.


[MyConnectionPool] Initializing
[MyConnectionPool] Initialized
[Default] javax.management.RuntimeMBeanException: RuntimeException thrown in the MBean's setter
[Default]     at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1417)
[Default]     at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
[Default]     at org.jboss.configuration.ConfigurationService.load(ConfigurationService.java:139)
[Default]     at java.lang.reflect.Method.invoke(Native Method)
[Default]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Default]     at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Default]     at org.jboss.Main.<init>(Main.java:143)
[Default]     at org.jboss.Main$1.run(Main.java:87)
[Default]     at java.security.AccessController.doPrivileged(Native Method)
[Default]     at org.jboss.Main.main(Main.java:83)
 
**Cause:**
  - Maybe you use an older version of i-net OPTA. You need release 2.05 fix or higher.
  - You have set a value for the URL. i-net OPTA's  XADataSource does not need and does not support a URL. 
 
----
 
<code java>
[MyConnectionPool] There seems to be a problem with the JDBC URL: java.lang.NoSuchMethodException

Cause: This is only a warning because there is no method getURL() in the datasource. i-net OPTA's XADataSource does not need and does not support a URL.

 

© Copyright 1996 - 2024, i-net software; All Rights Reserved.