Your ejb-jar.xml does not follow the DTD.  You include a
"resource-name" tag, but if you look in the DTD (chapter 16 of the EJB
1.1 spec) there is no such option.  Therefore, your jboss.xml should
refer to the res-ref-name in ejb-jar.xml not the invalid resource-name.
        I belive the next beta release will validate the ejb-jar.xml file,
but I need to confirm that.  Any ejb-jar.xml resource that does not have a
matching jboss.xml resource gets assigned to the default data source,
which is Hypersonic in this case.

Aaron

On Thu, 21 Sep 2000, Andrew wrote:
> You are right!
> I replace on:
> //Properties env= (Properties)context.lookup( "java:comp/env");
>    creation= (String)context.lookup( "java:comp/env/createCalcSQL");
>    deletion= (String)context.lookup( "java:comp/env/deleteCalcSQL");
> And all works fine I think...
> But how about my Oracle connection? I've got following exception after  find
> invocation:
> java.rmi.ServerException: RemoteException occurred in server thread; nested
> exception is:
>  java.rmi.ServerException: exception occured while invoking finder method;
> nested exception is:
>  javax.ejb.EJBException: Table not found: CALC in statement [select kf_a
> from calc where zaka='test1']--this statement from environment all works
> fine.
> java.rmi.ServerException: exception occured while invoking finder method;
> nested exception is:
>  javax.ejb.EJBException: Table not found: CALC in statement [select kf_a
> from calc where zaka='test1']
> javax.ejb.EJBException: Table not found: CALC in statement [select kf_a from
> calc where zaka='test1']
>  at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
> all.java:245)
>  at
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
>  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
>  at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno
> wn Source)
>  at
> org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:221)
>  at $Proxy0.findByPrimaryKey(Unknown Source)
>  at a.main(a.java:14)
> Exception in thread "main"
> This means that  Hypersonic DB used in place of Oracle and console show
> that:
> [Console logging] Logging started
> [Classpath] Added directory:file:/C:/jboss/log/
> [Classpath] Added directory:file:/C:/jboss/tmp/
> [Classpath] Added directory:file:/C:/jboss/db/
> [Info] Java version: 1.3.0,Sun Microsystems Inc.
> [Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc.
> [Info] System: Windows 2000 5.0,x86
> [Classpath] Added library:file:/C:/jboss/lib/ext/activation.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/awt.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/classes12.zip
> [Classpath] Added library:file:/C:/jboss/lib/ext/dynaserver.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/ejb.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/ejxeditor.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/ejxejb.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/ejxjaws.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/ejxjboss.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/hsql.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/idb.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jboss.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jdbc2_0-stdext.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jmxtools.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jndi.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jnpserver.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jpl-util-0_5b.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/jta-spec1_0_1.jar
> [Classpath] Added library:file:/C:/jboss/lib/ext/mail.jar
> [JDBC] Loaded JDBC-driver:org.hsql.jdbcDriver
> [JDBC] Loaded JDBC-driver:jdbc.idbDriver
> [JDBC] Loaded JDBC-driver:oracle.jdbc.driver.OracleDriver
> [Webserver] Initializing
> [Webserver] Initialized
> [Hypersonic] Initializing
> [Hypersonic] Server 1.4 is running
> [Hypersonic] Database started
> [Hypersonic] Initialized
> [Naming] Initializing
> [Naming] Naming started on port 1099
> [Naming] Initialized
> [Transaction manager] Initializing
> [Transaction manager] Initialized
> [Simple Realm Mapping] Initializing
> [Simple Realm Mapping] Initialized
> [Security manager] Initializing
> [Security manager] Initialized
> [DataSource] Initializing
> [DataSource] Connection pool for jdbc:oracle:oci8:@SCDB bound to
> SCentre--------------------- My datasource
> [DataSource] Initialized
> [DataSource] Initializing
> [DataSource] Connection pool for jdbc:idb:../conf/instantdb.properties bound
> to
> InstantDB
> InstantDB - Version 3.12
> [DataSource] Copyright (c) 1997-1999 Instant Computer Solutions Ltd.
> [DataSource] Initialized
> [XADataSource] Initializing
> [XADataSource] Initialized
> [Container factory] Initializing
> [Container factory] Temporary directory set to:C:\jboss\tmp\deploy
> [Container factory] Initialized
> [Auto deploy] Auto-deploying C:\jboss\deploy
> [Auto deployer] Initializing
> [Auto deployer] Initialized
> [JMX RMI Adaptor] Initializing
> [JMX RMI Adaptor] Initialized
> [JMX RMI Connector] Initializing
> [JMX RMI Connector] Initialized
> [Configuration] Initializing
> [Configuration] Initialized
> [Configuration] MaxActiveClientCount set to 10 in Adaptor:name=html
> [Configuration] Port set to 8082 in Adaptor:name=html
> [Configuration] LibraryDirectory set to C:\jboss\bin in
> DefaultDomain:service=ML
> et
> [Configuration] URL set to jdbc:HypersonicSQL:hsql://localhost in
> DefaultDomain:
> service=XADataSource,name=Hypersonic
> [Configuration] JDBCUser set to sa in
> DefaultDomain:service=XADataSource,name=Hy
> personic
> [Configuration] MaxSize set to 0 in
> DefaultDomain:service=XADataSource,name=Hype
> rsonic
> [Configuration] ShrinkPercent set to 0.33 in
> DefaultDomain:service=XADataSource,
> name=Hypersonic
> [Configuration] GCEnabled set to false in
> DefaultDomain:service=XADataSource,nam
> e=Hypersonic
> [Configuration] TimestampUsed set to false in
> DefaultDomain:service=XADataSource
> ,name=Hypersonic
> [Configuration] Blocking set to false in
> DefaultDomain:service=XADataSource,name
> =Hypersonic
> [Configuration] GCMinIdleTime set to 1200000 in
> DefaultDomain:service=XADataSour
> ce,name=Hypersonic
> [Configuration] InvalidateOnError set to false in
> DefaultDomain:service=XADataSo
> urce,name=Hypersonic
> [Configuration] MinSize set to 0 in
> DefaultDomain:service=XADataSource,name=Hype
> rsonic
> [Configuration] ShrinkMinIdleTime set to 600000 in
> DefaultDomain:service=XADataS
> ource,name=Hypersonic
> [Configuration] ShrinkingEnabled set to false in
> DefaultDomain:service=XADataSou
> rce,name=Hypersonic
> [Configuration] Format set to [{2}] {4} in
> DefaultDomain:service=Logging,type=Co
> nsole
> [Configuration] Port set to 8083 in DefaultDomain:service=Webserver
> [Configuration] VerifyDeployments set to true in
> EJB:service=ContainerFactory
> [Naming] Starting
> [Naming] Started
> [Hypersonic] Starting
> [Hypersonic] Started
> [DataSource] Starting
> [DataSource] Started
> [DataSource] Starting
> [DataSource] Started
> [Transaction manager] Starting
> [Transaction manager] Started
> [XADataSource] Starting
> [XADataSource] XA Connection pool Hypersonic bound to Hypersonic
> [XADataSource] Started
> [Container factory] Starting
> [Container factory] Started
> [Auto deployer] Starting
> [Auto deploy] Auto deploy of file:/C:/jboss/deploy/
> [Container factory] Deploying:file:/C:/jboss/deploy/
> [Container factory] Loading ejb-jar.xml :
> file:/C:/jboss/deploy/META-INF/ejb-jar
> .xml
> [Container factory] Loading standardjboss.xml :
> jar:file:/C:/jboss/lib/ext/jboss
> .jar!/org/jboss/metadata/standardjboss.xml
> [Container factory] file:/C:/jboss/deploy/META-INF/jboss.xml found.
> Overriding d
> efaults
> [Verifier] Verifying file:/C:/jboss/deploy/
> [Verifier] CalculationBean: Verified.
> [Container factory] Deploying CalculationBean
> [Container factory] Container Invoker Optimize='false'
> [Container factory] java.lang.ClassNotFoundException: class
> org.jboss.security.E
> JBSecurityManagerDefaultImpl
> [Container factory] Using default
> DataSource:Hypersonic-------------------------------Why? I was asking for
> Oracle...
> [Container factory] Bound CalculationBean to CalculationBean
> [Container factory] Deployed application: file:/C:/jboss/deploy/
> [Auto deployer] Started
> [Security manager] Starting
> [Security manager] Started
> [Simple Realm Mapping] Starting
> [Simple Realm Mapping] Started
> [Webserver] Starting
> [Webserver] Codebase set to http://localhost:8083/
> [Webserver] Started webserver on port 8083
> [Webserver] Started
> [JMX RMI Adaptor] Starting
> [JMX RMI Adaptor] Started
> [JMX RMI Connector] Starting
> [JMX RMI Connector] Started
> [Default] 18 services and 4 other MBeans started.
> [Default] Shutdown hook added
> [Default] jBoss 2.0 BETA-PROD-01 Started
> -----------------------------------------------------------------
> 
> in jboss.conf:
> <MLET CODE = "org.jboss.jdbc.DataSourceImpl"
> ARCHIVE="jboss.jar,classes12.jar" CODEBASE="../lib/ext/">
>    <ARG TYPE="java.lang.String" VALUE="jdbc:oracle:oci8:@SCDB">
>    <ARG TYPE="java.lang.String" VALUE="SCentre">
>    <ARG TYPE="java.lang.String" VALUE="oracle.jdbc.driver.OracleDriver">
>    <ARG TYPE="java.lang.String" VALUE="scott">
>    <ARG TYPE="java.lang.String" VALUE="Escorial">
> </MLET>
> in jboss.xml:
> <resource-managers>
>     <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
>         <res-name>SCTest</res-name>
>         <res-jndi-name>SCentre</res-jndi-name>
>     </resource-manager>
> </resource-managers>
> in ejb-jar.xml:
> 
>            <resource-ref>
>                 <description>A jdbc connection for the BMP
> bean</description>
>                 <res-ref-name>jdbc/SC1</res-ref-name>
>                 <resource-name>SCTest</resource-name>
>                 <res-type>javax.sql.DataSource</res-type>
>                 <res-auth>Container</res-auth>
>             </resource-ref>
> Thnk you.
> 
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to