[Persistence, JBoss/CMP, Hibernate, Database] - JBoss 3.2.5 and Oracle9/10
by jpjob
Hi!
We are still using JBoss 3.2.5 and MVCSoft PM with a Oracle 8 classes12.zip driver (patched up to work with Oracle 9 servers). Now we need to upgrade to a newer Oracle JDBC driver because we have to connect to a database cluster and the Oracle8 driver doesn't understand the syntax of the connection URL needed. But with the new driver (we've tried classes12.zip and ojdbc14.jar from Oracle 9 and 10) we are experiencing strange errors and data corruption.
Changing an entitiy's attribute value results in "~-" being written to a NUMBER column and reading from that table throws exceptions like "not a number" (or similar). Also when updating or deleting entities the application is unable to find the rows and we get errors like "target of remove not found".
I've modified the MVCSoft PM code to get some debugging output and could verify that executeUpdate() frequently returns 0 rows affected even though the relevant rows are there and can be seen inside the transaction. It seems like the parameters passed to the preparedStatement get corrupted when transferred to the database.
We had a similar data corruption problem a few years back when accessing a Oracle9 database with the Orcale8 driver (that was when we patched up the Oracle8 driver). But this time the version of the driver matches the version of the database server. We can reproduce this with Oracle9 and Oracle10 (with a single database server, no cluster). With the older driver the same code runs fine.
As far as I can tell, there is only one driver in the JBoss classpath. At least, one doesn't show up in boot.log.
Has anybody else experienced such incompatibilities? I don't know where else to look.
The best thing would probably be to upgrade to a newer JBoss version and different persistence layer, but as is always the case, the project deadline has already been reached :( So any help would be greatly appreciated.
Thanks, jp
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014152#4014152
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014152
19Â years, 2Â months
[JBoss Seam] - Re: Foreign Keys and changing Seam Gen templates
by damianharvey
I totally misunderstood what Hibernate was trying to do there. I get it now.
What I was really after was the <si:selectItems> and for those looking it's all detailed here: http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamSelectItemsNewDesign
The only problem I'm now facing is that the si:selectItems doesn't seem to want to play nice with the EntityHome that Seam Gen uses on all Create/Edit pages. This is covered in this thread: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008752#4008752
Also for anyone interested I made a change to the edit.xhtml.ftl template to include si:selectItems for ManyToOne fields:
| <#elseif c2h.isManyToOne(property)>
| <#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
| <#assign parentPageName = parentPojo.shortName>
| <#assign parentName = util.lower(parentPojo.shortName)>
|
| <tr class="prop">
| <td class="name">${property.name}</td>
| <td class="value">
| <s:decorate>
| <h:selectOneMenu value="${'#'}{${homeName}.instance.${property.name}}">
| <si:selectItems value="${'#'}{${parentName}SelectList.resultList}" var="${parentName}" label="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
| </h:selectOneMenu>
| </s:decorate>
| </td>
| </tr>
|
This goes between the last 2 </#if> which are before the first </#foreach>. I also deleted the association stuff after the actionButtons.
You still have to configure the project to handle si:selectItems and configure the components.xml to have the relevant queries; eg:
| <framework:entity-query name="countryCodeSelectList" ejbql="select c from CountryCode c" />
|
Hope this helps someone.
Cheers,
Damian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014137#4014137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014137
19Â years, 2Â months
[JBossCache] - Re: how do i clean (remove) all nodes from a cache loader?
by gmeroz
I'm not using async mode.
i made sure the cache is empty (nodes are not found anymore). but the JDBCCacheLoader's table content did not change.
i'm using JBossCache-all-2.0.0.ALPHA2 deployed on jboss-4.0.3SP1.
with the following configuration:
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
| <attribute name="IsolationLevel">READ_COMMITTED</attribute>
|
| <attribute name="CacheMode">LOCAL</attribute>
| <attribute name="CacheLoaderConfiguration">
| <config>
| <passivation>false</passivation>
| <preload>/</preload>
| <shared>true</shared>
|
| <cacheloader>
| <!--<class>org.jboss.cache.loader.FileCacheLoader</class>-->
| <!--<properties>-->
| <!--location=d:\temp\jc-->
| <!--</properties>-->
| <class>org.jboss.cache.loader.JDBCCacheLoader</class>
| <properties>
| cache.jdbc.table.name=jbosscache_application
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=true
| cache.jdbc.table.primarykey=jbosscache_application_pk
| cache.jdbc.fqn.column=fqn
| cache.jdbc.fqn.type=varchar(255)
| cache.jdbc.node.column=node
| cache.jdbc.node.type=blob
| cache.jdbc.parent.column=parent
| cache.jdbc.datasource=java:/beDS
| </properties>
|
| <async>false</async>
| <fetchPersistentState>false</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| <purgeOnStartup>false</purgeOnStartup>
| </cacheloader>
| </config>
| </attribute>
What can explain this behaviour?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014133#4014133
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014133
19Â years, 2Â months