One more thought. It doesn't look like the CMP init command
executes in the context of a transaction - it's just part of the Container
startup sequence. So it could be that the table is created but never
committed. Most DBs seem to treat crating a table as a permanent action
(you can't roll it back), but perhaps PostgreSQL does not.
Perhaps we should create a new transaction before we initialize
the persistence manager, and then commit it afterward? Thoughts?
Aaron
On Sat, 30 Sep 2000, Aaron Mulder wrote:
> Strange... Everything *looks* OK. The only weird thing is
> that the table is supposedly created as "AdProfession" but the log
> complains about "adprofession". I don't know that much about PostgreSQL,
> but does the DB account you're using have permissions to create
> tables? Could the case difference in the table names be a problem?
> It's definitely strange that JAWS seems to think the table was
> created successfully - you would think the DB driver would throw an
> exception if it refused to create the table. Can you narrow down which
> action causes the log message stating that the table does not exist?
>
> Aaron
>
> On Sat, 30 Sep 2000 [EMAIL PROTECTED] wrote:
> > Hi
> > In BETA-PROD I'm trying to use XADataSourceLoader to configure a connection...
> > But table not created on deploy
> >
> > >> from jboss.jcml
> >
> > <mbean name="DefaultDomain:service=XADataSource,name=PostgreSQL">
> > <attribute name="Properties"></attribute>
> > <attribute name="URL">jdbc:postgresql://192.168.10.18:3312/upsa</attribute>
> > <attribute name="GCMinIdleTime">1200000</attribute>
> > <attribute name="Password">test</attribute>
> > <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">postgress</attribute>
> > <attribute name="MinSize">0</attribute>
> > <attribute name="ShrinkMinIdleTime">600000</attribute>
> > <attribute name="ShrinkingEnabled">false</attribute>
> > </mbean>
> >
> > >> from jboss.conf
> >
> > <MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,postgresql.jar"
>CODEBASE="../lib/ext/">
> > <ARG TYPE="java.lang.String" VALUE="PostgreSQL">
> > <ARG TYPE="java.lang.String" VALUE="org.jboss.minerva.xa.XADataSourceImpl">
> > </MLET>
> >
> > >>>ejb-jar.xml
> >
> > <?xml version="1.0" encoding="Cp1251"?>
> >
> > <ejb-jar>
> > <enterprise-beans>
> > <entity>
> > <ejb-name>AdProfessionBean</ejb-name>
> > <home>com.ulybin.JobBoerse.database.adprofession.AdProfessionHome</home>
> > <remote>com.ulybin.JobBoerse.database.adprofession.AdProfession</remote>
> >
><ejb-class>com.ulybin.JobBoerse.database.adprofession.AdProfessionBean</ejb-class>
> > <persistence-type>Container</persistence-type>
> >
><prim-key-class>com.ulybin.JobBoerse.database.adprofession.AdProfessionPK</prim-key-class>
> > <reentrant>False</reentrant>
> > <cmp-field>
> > <field-name>ad_id</field-name>
> > </cmp-field>
> > <cmp-field>
> > <field-name>category_id</field-name>
> > </cmp-field>
> > <cmp-field>
> > <field-name>spec_id</field-name>
> > </cmp-field>
> > </entity>
> > </enterprise-beans>
> > <assembly-descriptor>
> > <container-transaction>
> > <method>
> > <ejb-name>AdProfessionBean</ejb-name>
> > <method-name>*</method-name>
> > </method>
> > <trans-attribute>NotSupported</trans-attribute>
> > </container-transaction>
> > </assembly-descriptor>
> > </ejb-jar>
> >
> >
> > >>jaws.xml
> > <?xml version="1.0" encoding="Cp1251"?>
> >
> > <jaws>
> > <datasource>PostgreSQL</datasource>
> > <type-mappings>
> > <type-mapping>
> > <name>PostgreSQL</name>
> > <mapping>
> > <java-type>java.lang.Character</java-type>
> > <jdbc-type>CHAR</jdbc-type>
> > <sql-type>CHAR</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Long</java-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > <sql-type>INT8</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.sql.Date</java-type>
> > <jdbc-type>DATE</jdbc-type>
> > <sql-type>DATE</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Boolean</java-type>
> > <jdbc-type>VARCHAR</jdbc-type>
> > <sql-type>BOOL</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Object</java-type>
> > <jdbc-type>BLOB</jdbc-type>
> > <sql-type>BLOB</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.String</java-type>
> > <jdbc-type>VARCHAR</jdbc-type>
> > <sql-type>VARCHAR(256)</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.sql.TimeStamp</java-type>
> > <jdbc-type>TIMESTAMP</jdbc-type>
> > <sql-type>INTERVAL</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Double</java-type>
> > <jdbc-type>DOUBLE</jdbc-type>
> > <sql-type>FLOAT8</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Integer</java-type>
> > <jdbc-type>INTEGER</jdbc-type>
> > <sql-type>INT4</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Float</java-type>
> > <jdbc-type>FLOAT</jdbc-type>
> > <sql-type>FLOAT4</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Byte</java-type>
> > <jdbc-type>TINYINT</jdbc-type>
> > <sql-type>TINYINT</sql-type>
> > </mapping>
> > <mapping>
> > <java-type>java.lang.Short</java-type>
> > <jdbc-type>INTEGER</jdbc-type>
> > <sql-type>INT2</sql-type>
> > </mapping>
> > </type-mapping>
> > </type-mappings>
> > <type-mapping>PostgreSQL</type-mapping>
> >
> > <enterprise-beans>
> > <entity>
> > <ejb-name>AdProfessionBean</ejb-name>
> > <table-name>AdProfession</table-name>
> > <create-table>true</create-table>
> > <remove-table>false</remove-table>
> > <tuned-updates>true</tuned-updates>
> > <read-only>false</read-only>
> > <time-out>300</time-out>
> > <cmp-field>
> > <field-name>ad_id</field-name>
> > <column-name>ad_id</column-name>
> > <sql-type>INT8</sql-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > </cmp-field>
> > <cmp-field>
> > <field-name>category_id</field-name>
> > <column-name>category_id</column-name>
> > <sql-type>INT8</sql-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > </cmp-field>
> > <cmp-field>
> > <field-name>spec_id</field-name>
> > <column-name>spec_id</column-name>
> > <sql-type>INT8</sql-type>
> > <jdbc-type>BIGINT</jdbc-type>
> > </cmp-field>
> > <finder>
> > <name>findByADId</name>
> > <query>ad_id = {0}</query>
> > <order></order>
> > </finder>
> > </entity>
> > </enterprise-beans>
> > </jaws>
> >
> >
> > >>jboss log
> > ...
> > [XADataSource] Starting
> > [XADataSource] XA Connection pool PostgreSQL bound to PostgreSQL
> > [XADataSource] Started
> > ...
> > [Auto deploy] Auto deploy of file:/D:/temp/CVS/jboss/dist/deploy/adprofession.jar
> > [Container factory] Deploying:file:/D:/temp/CVS/jboss/dist/deploy/adprofession.jar
> > [Container factory] Loading ejb-jar.xml :
>jar:file:/D:/temp/CVS/jboss/dist/tmp/deploy/tmpejbjar4390.
> > jar!/META-INF/ejb-jar.xml
> > [Container factory] Loading standardjboss.xml :
>jar:file:/D:/temp/CVS/jboss/dist/lib/ext/jboss.jar!/
> > org/jboss/metadata/standardjboss.xml
> > [Verifier] Verifying file:/D:/temp/CVS/jboss/dist/tmp/deploy/tmpejbjar4390.jar
> > [Verifier] AdProfessionBean: Verified.
> > [Container factory] Deploying AdProfessionBean
> > [Container factory] Container Invoker Optimize='false'
> > [JAWS] Initializing JAWS plugin for AdProfessionBean
> > [JAWS] Loading standardjaws.xml :
>jar:file:/D:/temp/CVS/jboss/dist/lib/ext/jboss.jar!/org/jboss/ejb/
> > plugins/jaws/metadata/standardjaws.xml
> > [JAWS]
>jar:file:/D:/temp/CVS/jboss/dist/tmp/deploy/tmpejbjar4390.jar!/META-INF/jaws.xml
>found. Overr
> > iding defaults
> > [JAWS] Table AdProfession created
> > [Container factory] Bound AdProfessionBean to AdProfessionBean
> > [Container factory] Deployed application:
>file:/D:/temp/CVS/jboss/dist/deploy/adprofession.jar
> > ....
> >
> > >>>>postgreSQL log
> > ...
> > ERROR: adprofession: Table does not exist.
> > NOTICE: (transaction aborted): all queries ignored until end of transaction block
> > ..
> >
> >
> > Any ideas? (All works fine on jboss pre4)
> >
> > Thanx a lot,
> >
> > Nahibin Serhiy
> > Software Developer
> >
> > ULYBIN GmbH
> > http://www.ulybin.com
> >
> > Phone: +38 0322 797 403
> > Phone/Fax: +38 0322 728 835
> > E-mail: [EMAIL PROTECTED]
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
>Behalf Of Aaron Mulder
> > Sent: Friday, September 29, 2000 10:32 PM
> > To: jBoss
> > Subject: Re: [jBoss-User] PostgreSQL & Minerva
> >
> >
> > In the BETA-PROD-1 build, you could use DataSourceImpl instead of
> > XADataSourceLoader to configure a connection. That is no longer available
> > (as of this morning). Both put an implementation of DataSource in JNDI,
> > so the client code and Deployment Descriptors are the same, it was just
> > the jboss.conf and jboss.jcml entries that were different.
> > There is no other approved way to get a connection in J2EE.
> > We'll be adding specific data source examples to the manual for
> > Oracle, Postgres, DB/2, and so on (speak up if you use another DB, though
> > it has to be one I can get a copy of for testing!).
> >
> > Aaron
> >
> > On Fri, 29 Sep 2000, Christian Bourque wrote:
> > > Does anyone knows how to setup Minerva with PostgreSQL ?
> > >
> > > In a cmp bean is there a way to request a database connection from a
> > > DataSource (jboss.conf) without using Minerva (XADataSource...) ???
> > >
> > > Thanks
> > >
> > > Christian
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Problems?: [EMAIL PROTECTED]
> >
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>