[Installation, Configuration & Deployment] - Re: 4.0.5 to 4.2.0 upgrade and JBossTS
by helgaw
Currently I am getting
java.lang.IllegalArgumentException: object is not an instance of declaring class
while creating entity beans (ejb 2). Reads, updates and deletes seem to work fine.
I have not modifed the jbossjta-properties.xml file but I have moved all my -ds.xml files from
<local-tx-datasource>
to
<xa-datasource>
I would prefer that rather than sticking with the local transactions as that is more of a long term solution.
I am planning to move the system to ejb3 but would prefer not to have to do a big-bang transfer.
My ds file looks like this
| <datasources>
| <xa-datasource>
| <jndi-name>SystemDS</jndi-name>
| <xa-datasource-property name="URL">jdbc:mysql://myserver/mydb</xa-datasource-property>
| <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
| <user-name>myusername</user-name>
| <password>mypassword</password>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
|
| <!-- Don't allow connections to hang out idle too long,
| never longer than what wait_timeout is set to on the
| server...A few minutes is usually okay here,
| it depends on your application
| and how much spikey load it will see -->
|
| <idle-timeout-minutes>5</idle-timeout-minutes>
| <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
|
| <!-- trying to get XA to work -->
| <track-connection-by-tx>true</track-connection-by-tx>
| <no-tx-separate-pools/>
|
| <!-- If you're using Connector/J 3.1.8 or newer, you can use
| our implementation of these to increase the robustness
| of the connection pool. -->
| <exception-sorter-class-name>
| com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter
| </exception-sorter-class-name>
| <valid-connection-checker-class-name>
| com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker
| </valid-connection-checker-class-name>
| </xa-datasource>
| </datasources>
|
and I am using mysql-connector 5.0.3 (also tried 5.0.6)
There is no example of a mysql -ds file using xa provided in the docs\examples\jca directories.
Here is a log of what happens:
| 2007-06-12 13:19:05,637 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MobileStyleSheets] Executing SQL: SELECT pageid, device, instance, stylesheet FROM mobilestylesheets WHERE (id=?)
| 2007-06-12 13:19:05,667 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MobileStyleSheets] Executing SQL: SELECT pageid, device, instance, stylesheet FROM mobilestylesheets WHERE (id=?)
| 2007-06-12 13:19:05,697 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MobilePages] Executing SQL: SELECT name, type, reference, owner, url, variant, created, pagetype, faceid FROM mobilepages WHERE (id=?)
| 2007-06-12 13:19:05,737 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.MobilePages] Executing SQL: SELECT name, type, reference, owner, url, variant, created, pagetype, faceid FROM mobilepages WHERE (id=?)
| 2007-06-12 13:19:05,777 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.Visit] Executing SQL: INSERT INTO visits (ownerfaceid, page, pagetype, visitorfaceid, visitorip, visitorsession, timestamp, date, userAgent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
| 2007-06-12 13:19:05,927 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract net.hexia.cia.oem.track.entity.Visit net.hexia.cia.oem.track.entity.VisitHome.create(net.hexia.cia.oem.track.entity.VisitVO) throws javax.ejb.CreateException, causedBy:
| java.lang.IllegalArgumentException: object is not an instance of declaring class
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.executeInsert(JDBCMySQLCreateCommand.java:116)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:321)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:151)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:587)
| at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:237)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:225)
| at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:625)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1126)
| at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
| at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
| at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
| at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
| at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:521)
| at org.jboss.ejb.Container.invoke(Container.java:981)
| at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
| at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
| at $Proxy565.create(Unknown Source)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053535#4053535
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053535
18Â years, 10Â months
[JBoss Seam] - s:link and expression language #{}
by tkalactomo
I have a tomahawk tree component which I'm trying to use as a navigator for my application....This tree component uses as value my katalog.katalog which is my type of implementation of treenode.I did that because i need one more proprety to get one more value besides, description and identifier, and that is which pageflow should i use on s:link tag to know whic pageflow to start.
But when I through expresion language try to get to that value(pageflow) on s:link tag <s:link pageflow="#{node.pageflow}" i get non value....can someone please help...??
<t:tree2 id="clientTree" value="#{katalog.katalog}" var="node"
varNodeToggler="t">
<f:facet name="orka">
<h:panelGroup>
<f:facet name="expand">
<t:graphicImage value="/slike/ikone/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
</f:facet>
<f:facet name="collapse">
<t:graphicImage value="/slike/ikone/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
</f:facet>
<h:outputText value="#{node.description}" styleClass="nodeFolder"/>
<h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
</h:panelGroup>
</f:facet>
<f:facet name="grana">
<h:panelGroup>
<f:facet name="expand">
<t:graphicImage value="/slike/ikone/yellow-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>
</f:facet>
<f:facet name="collapse">
<t:graphicImage value="/slike/ikone/yellow-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>
</f:facet>
<h:outputText value="#{node.description}" styleClass="nodeFolder"/>
<h:outputText value=" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>
</h:panelGroup>
</f:facet>
<f:facet name="posao">
<h:panelGroup>
<t:commandLink action="#{node.getIdentifier}">
<t:graphicImage value="/slike/ikone/document.png" border="0"/>
<t:outputText value="#{node.description}"/>
</t:commandLink>
<f:verbatim>: </f:verbatim>
<<<<<<<<<THIS IS THAT WHAT MATTERS I NEED TO KNOW WHICH PAGEFLOW TO START>>>>>>>>>>>>>>>
<s:link value="#{node.pageflow}"
view="#{node.identifier}"
propagation="begin"
pageflow="#{node.pageflow}"/>
<<<<<<<<<<<THIS WAY WORKS BUT IT'S TOTALY FIX>>>>>>>>>>>>>>>>
<s:link
value="#{node.pageflow}"
view="#{node.identifier}"
propagation="begin"
pageflow="operater"/>
</h:panelGroup>
</f:facet>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053527#4053527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053527
18Â years, 10Â months