Aaron,
Thanks for responding. With the files, this is necessarily long but here goes.
I am using the jBoss 2.0 BETA-PROD-1 binary. The original jboss.conf and
jboss.jcml as created/installed after running InstallAnywhere work fine--I
ran through the entire "Getting Started: Beginning EJB programming using
jBoss (Linux)" just fine. Both my jboss.conf and jboss.jcml are given
below. (BTW, while I've stumbled across notes on how to use jboss.conf,
I've found nothing on jboss.jcml--not what it is, not how it's used, not
how to modifiy it. As a consequence, I haven't touched it.)
I should say at this point that last week I set up a JRun 3.0 EJB server on
the same machine and got at JDBC connection to Oracle no problem. However
I had a number of other difficulties with JRun (like their security model)
and I wanted to try an open source solution (having used Apache for almost
4 years now).
My problems comes when I try connecting to Oracle with jBoss. The first
approach I tried was that described in the "Getting Started: CMP with
ORACLE Howto" (aka, "JBoss CMP Quick Start using JBoss 2.0 and
Oracle"). Per instructions, I get the Minerva jar (minerva-0.99.jar) and
the Oracle classes (classes12_01.zip and nls_charset12_01.zip from Oracle's
web site). I add the Oracle drivers to the jboss.properties file and can
see them load when jBoss starts:
...
[Classpath] Added library:file:/opt/jboss/lib/ext/jta-spec1_0_1.jar
[Classpath] Added library:file:/opt/jboss/lib/ext/mail.jar
[Classpath] Added library:file:/opt/jboss/lib/ext/minerva-0.99.jar
[Classpath] Added library:file:/opt/jboss/lib/ext/classes12_01.zip
[Classpath] Added library:file:/opt/jboss/lib/ext/nls_charset12_01.zip
[JDBC] Loaded JDBC-driver:org.hsql.jdbcDriver
[JDBC] Loaded JDBC-driver:jdbc.idbDriver
[JDBC] Loaded JDBC-driver:oracle.jdbc.driver.OracleDriver
[Webserver] Initializing
...
To the jboss.conf I add the following MLET:
<!--
-- For using Oracle for JBoss CMP. From http://www.jboss.org/oraclecmp.htm
--
-->
<MLET CODE="org.jboss.jdbc.XADataSourceLoader"
ARCHIVE="jboss.jar,minerva-0.99.jar,classes12_01.zip" CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="OptixConnectionPool">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
<ARG TYPE="java.lang.String"
VALUE="jdbc:oracle:thin:@localhost:1521:optix">
<ARG TYPE="java.lang.String" VALUE="optix">
<ARG TYPE="java.lang.String" VALUE="optix1">
<ARG TYPE="java.lang.String" VALUE="">
<ARG TYPE="java.lang.Integer" VALUE="2">
<ARG TYPE="java.lang.Integer" VALUE="5">
<ARGTYPE="java.lang.String"
VALUE="GCEnabled=true;ShrinkingEnabled=true;GCMinIdleTime=30000;GCInterval=10000;ShrinkMinIdleTime=30000">
</MLET>
But I get the following error when I start jBoss:
[JMX RMI Adaptor] Initializing
[JMX RMI Adaptor] Initialized
[JMX RMI Connector] Initializing
[JMX RMI Connector] Initialized
[Configuration] Initializing
[Configuration] Initialized
javax.management.ReflectionException
at
com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServ
erImpl.java:2207)
at
com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.ja
va:761)
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.<init>(Main.java:94)
at org.jboss.Main$1.run(Main.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:75)
[Configuration] MaxActiveClientCount set to 10 in Adaptor:name=html
NOTE: I have tried unzipping and jarring the oracle zip file and I have
tried simply renaming it to oracle.jar (as suggested in a Bugzilla note)
but these schemes fail, too.
The other method I try is from "Getting Started: Adding a DataSource to
jBoss 2". I leave jboss.properties unchanged (with the same OracleDriver
load seen as above) but now the jboss.conf MLET for Oracle is
<!--
-- For using Oracle for JBoss CMP. From
http://www.jboss.org/datasource.htm
--
-->
<MLET CODE="org.jboss.jdbc.DataSourceLoader"
ARCHIVE="jboss.jar,classes12_01.zip" CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String"
VALUE="jdbc:oracle:thin:@localhost:1521:optix">
<ARG TYPE="java.lang.String" VALUE="OptixConnectionPool">
<ARG TYPE="java.lang.String" VALUE="oracle.jdbc.driver.OracleDriver">
<ARG TYPE="java.lang.String" VALUE="optix">
<ARG TYPE="java.lang.String" VALUE="optix1">
</MLET>
It fails with a slightly different ReflectionException:
[JMX RMI Adaptor] Initializing
[JMX RMI Adaptor] Initialized
[JMX RMI Connector] Initializing
[JMX RMI Connector] Initialized
[Configuration] Initializing
[Configuration] Initialized
javax.management.ReflectionException: The MBean class could not be loaded
by the
specified loader
at
com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.ja
va:754)
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.<init>(Main.java:94)
at org.jboss.Main$1.run(Main.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:75)
[Configuration] MaxActiveClientCount set to 10 in Adaptor:name=html
------- jboss.conf -------
<MLET CODE = "org.jboss.logging.Logger" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.logging.ConsoleLogging" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="Information,Debug,Warning,Error">
<ARG TYPE="java.lang.String" VALUE="[{2}] {4}">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="../../log/">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="../../tmp/">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="../../db/">
</MLET>
<MLET CODE = "org.jboss.util.Info" ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="./">
</MLET>
<MLET CODE = "org.jboss.jdbc.JdbcProvider"
ARCHIVE="jboss.jar,idb.jar,hsql.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.web.WebService" ARCHIVE="jboss.jar,dynaserver.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.jdbc.HypersonicDatabase"
ARCHIVE="jboss.jar,hsql.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.naming.NamingService" ARCHIVE="jnpserver.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.tm.TransactionManagerService"
ARCHIVE="jboss.jar,jta-spec1_0_1.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.security.SimpleRealmMappingService"
ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.security.EJBSecurityManagerService"
ARCHIVE="jboss.jar" CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.jdbc.DataSourceImpl"
ARCHIVE="jboss.jar,jdbc2_0-stdext.jar" CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="jdbc:idb:../conf/instantdb.properties">
<ARG TYPE="java.lang.String" VALUE="InstantDB">
<ARG TYPE="java.lang.String" VALUE="jdbc.idbDriver">
<ARG TYPE="java.lang.String" VALUE="">
<ARG TYPE="java.lang.String" VALUE="">
</MLET>
<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="Hypersonic">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
<MLET CODE = "org.jboss.ejb.ContainerFactory"
ARCHIVE="jboss.jar,ejb.jar,jnp-client.jar,ejxeditor.jar,ejxjboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.ejb.AutoDeployer" ARCHIVE="jboss.jar">
<ARG TYPE="java.lang.String" VALUE="../deploy/">
</MLET>
<MLET CODE = "org.jboss.jmx.server.JMXAdaptorService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "org.jboss.jmx.server.RMIConnectorService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE = "com.sun.jdmk.comm.HtmlAdaptorServer" ARCHIVE="jmxtools.jar"
CODEBASE="../lib/ext/" NAME="Adaptor:name=html">
</MLET>
<MLET CODE = "org.jboss.configuration.ConfigurationService"
ARCHIVE="jboss.jar,xml.jar" CODEBASE="../lib/ext/">
</MLET>
<!--
-- Uncomment this to add Tomcat support. Be sure to set your
'TOMCAT_HOME'
-- environment variable before starting JBoss.
--
-- MLET CODE = "org.jboss.tomcat.TomcatService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
-- /MLET>
-->
<!--
-- Uncomment this to add SpyderMQ support. Be sure to set your
'SPYDERMQ_HOME'
-- environment variable before starting JBoss. You'll' also need to
copy the
-- spyderMQ.properties file from your SpyderMQ installation to you JBoss
-- installation conf dir.
-- MLET CODE = "org.jboss.spydermq.SpyderMQService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
-- /MLET>
-->
------- jboss.jcml -------
<?xml version="1.0"?>
<server>
<mbean name="Adaptor:name=html">
<attribute name="MaxActiveClientCount">10</attribute>
<attribute name="Parser" />
<attribute name="Port">8082</attribute>
</mbean>
<mbean name="DefaultDomain:service=MLet">
<attribute name="LibraryDirectory">/opt/jboss/bin</attribute>
</mbean>
<mbean name="DefaultDomain:service=XADataSource,name=Hypersonic">
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:HypersonicSQL:hsql://localhost</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="Password" />
<attribute name="ShrinkPercent">0.33</attribute>
<attribute name="GCEnabled">false</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">false</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="JDBCUser">sa</attribute>
<attribute name="MinSize">0</attribute>
<attribute name="ShrinkMinIdleTime">600000</attribute>
<attribute name="ShrinkingEnabled">false</attribute>
</mbean>
<mbean name="DefaultDomain:service=Logging,type=Console">
<attribute name="Format">[{2}] {4}</attribute>
</mbean>
<mbean name="DefaultDomain:service=Webserver">
<attribute name="Port">8083</attribute>
</mbean>
<mbean name="EJB:service=ContainerFactory">
<attribute name="VerifyDeployments">true</attribute>
</mbean>
</server>
------------------
At 18:19 9/26/2000 -0400, you wrote:
> Are you using a current version of jBoss (2.0 BETA-PROD-1 binary,
>or a recent CVS)? Can you send along your jboss.conf and jboss.jcml files
>with the Oracle lines you tried? Did you get a line earlier in the server
>output indicating that the Oracle JDBC driver class
>(oracle.jdbc.driver.OracleDriver) was loaded successfully?
>
>Aaron
>
>On Tue, 26 Sep 2000, Thad Humphries wrote:
> > I have Oracle 8.1.6 on Red Hat 6.2 and jBoss 2.0 BETA-PROD-01.
> >
> > I have tired to get Oracle installed using two different approaches--one
> > via Minerva as described in Ewan Branda's "JBoss CMP Quick Start using
> > JBoss 2.0 and Oracle" and the other without Minerva using a description
> > Buzilla (similar to "Adding a Data Source to jBoss 2"). With both I get
> >
> > [Configuration] Initializing
> > [Configuration] Initialized
> > javax.management.ReflectionException: The MBean class could not be loaded
> > by the specified loader
> > at
> >
> com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:754)
> > 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.<init>(Main.java:94)
> > at org.jboss.Main$1.run(Main.java:84)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at org.jboss.Main.main(Main.java:75)
> >
> > when I try to start jBoss. If I remove the Oracle stuff from jboss.conf,
> > everything loads properly.
> >
> > Can anyone help? What am I missing? Is there something I need to add to
> > jboss.jcml and, if so, what?
--------------------------------------------------------------------------
Thad Humphries "Who is this that darkens my counsel
Web Development Manager With words without knowledge?"
Phone: 540/675-3015, ext. 225 - Job 38:1, NIV
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]