[JBoss Seam] - geam-gen generate-entities error
by gaboo
I'm trying to generate entities from an existing database.
For this table :
CREATE TABLE `abocc` (
| `ct` int(11) NOT NULL default '0',
| `dt_creat` datetime default NULL,
| `dt_modif` datetime default NULL,
| `dp_use` char(1) NOT NULL default 'O',
| `ct_pers` int(11) NOT NULL default '0',
| `ty` char(4) NOT NULL default '',
| `lb` char(39) default NULL,
| `ct_ref` int(11) default NULL,
| `dt_bgn` datetime default NULL,
| `dt_end` datetime default NULL,
| `dt_bgn_test` datetime default NULL,
| `dt_end_test` datetime default NULL,
| `nb_div` smallint(6) default '12',
| `nb_ren` smallint(6) default '12',
| `nb_ofs` smallint(6) default '0',
| `dp_rglt_post` char(1) default 'N',
| `mt_ht` float(7,2) default NULL,
| `tx_tva` float(6,1) default '19.6',
| PRIMARY KEY (`ct`),
| UNIQUE KEY `ct_pers` (`ct_pers`,`ty`,`ct`),
| UNIQUE KEY `ty` (`ty`,`ct_pers`,`ct`),
| UNIQUE KEY `dp_use` (`dp_use`,`ct`)
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
I get an error when trying to compile generated java files :
[javac] Compiling 69 source files to /home/gaboo/workspace/testSeamLrb/exploded-archives/testSeamLrb.jar
| [javac] /home/gaboo/workspace/testSeamLrb/src/com/lrb/testSeamLrb/Abocc.java:20: '}' expected
| [javac] , uniqueConstraints = { @UniqueConstraint(columnNames={"ct_pers", "ty", "ct"}) @UniqueConstraint(columnNames={"dp_use", "ct"}) }
| [javac] ^
|
Here is the generated annotation :
/**
| * Abocc generated by hbm2java
| */
| @Entity
| @Table(name="abocc"
| ,catalog="lrb"
| , uniqueConstraints = { @UniqueConstraint(columnNames={"ct_pers", "ty", "ct"}) @UniqueConstraint(columnNames={"dp_use", "ct"}) }
| )
| public class Abocc implements java.io.Serializable {
|
|
There is indeed several unique keys constraints. Obviously, the annotation syntax is not correct. I've not found an example annotation with two unique constraints either on hibernate documentatin or searching on google.
I though it is a hibernate problem but the hibernate site asks us to come here if it's seam related.
Thanks for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991701#3991701
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991701
18 years, 1 month
[JBoss Seam] - Re: Problems with i18n in Chinese
by Seto
| <?xml version="1.0" encoding="utf-8"?>
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:a="https://ajax4jsf.dev.java.net/ajax">
| <f:view>
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| <title>#{messages['SiteTitle']}</title>
| <!-- ????? -->
| <link rel="stylesheet" href="css/global.css" type="text/css" media="all" />
| </head>
| <body>
| <div align="center">
| <div id="header">
| </div>
| <div id="search">
| <h:form>
| <div id="search_left">
| <h:selectOneMenu value="#{localeSelector.language}">
| <f:selectItems value="#{localeSelector.supportedLocales}"/>
| </h:selectOneMenu>
| <h:commandButton action="#{localeSelector.select}" value="#{messages['ChangeLanguage']}"/>
| </div>
| <div id="search_right">
| <div id="search_string">
| ???
| <h:inputText value="#{articleSearch.searchString}" style="width: 140px; height: 20px"/>
| </div>
|  
| <h:selectOneMenu id="search_field" value="#{articleSearch.field}">
| <f:selectItem itemLabel="-???-" itemValue="title" />
| <f:selectItem itemLabel="tag" itemValue="tag" />
| <f:selectItem itemLabel="??" itemValue="title" />
| <f:selectItem itemLabel="???" itemValue="short_title" />
| <f:selectItem itemLabel="???" itemValue="long_title" />
| <f:selectItem itemLabel="??" itemValue="author" />
| <f:selectItem itemLabel="??" itemValue="intro" />
| <f:selectItem itemLabel="??" itemValue="content" />
| </h:selectOneMenu>
|  
| <a:commandButton value="??"
| action="#{articleSearch.doSearchWithRedirect}" styleClass="button"/>
| </div>
| </h:form>
| </div>
| <div id="main">
| <ui:insert name="content" />
| </div>
| <div id="footer">
| ???? | ???? | ???? | ???? | ????? | ???? | ???? | ???? | ???? | ????
| </div>
| <div id="copyright">
| ???? ???? ???? KaibaSeto(a)gmail.com
| <br />
| ????IE6?????????
| </div>
| </div>
| </body>
| </f:view>
| </html>
|
| SiteTitle = ??mm
| ChangeLanguage = ????
|
The problem is the Chinese display incorrectly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991700#3991700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991700
18 years, 1 month
[Beginners Corner] - jndi deployment failure
by sej
I have a jndi file:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Dev Datasource -->
<local-tx-datasource>
<jndi-name>providerqDbInfo</jndi-name>
<connection-url>jdbc:JSQLConnect://myserver/database=mydatabase&sqlVersion=8</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<user-name>abcdef</user-name>
ghijklm
<check-valid-connection-sql>Select 1</check-valid-connection-sql>
<type-mapping>MS SQLSERVER2000</type-mapping>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<blocking-timeout-millis>120000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<Pool.MaximumActiveConnections>100</Pool.MaximumActiveConnections>
<Pool.MaximumIdleConnections>30</Pool.MaximumIdleConnections>
<Pool.MaximumWait>60000</Pool.MaximumWait>
<Pool.ValidationQuery>select 1</Pool.ValidationQuery>
<Pool.LogAbandoned>false</Pool.LogAbandoned>
<Pool.RemoveAbandoned>false</Pool.RemoveAbandoned>
<Pool.RemoveAbandonedTimeout>50000</Pool.RemoveAbandonedTimeout>
<Pool.MaximumCheckoutTime>120000</Pool.MaximumCheckoutTime>
<Pool.TimeToWait>20000</Pool.TimeToWait>
<Pool.PingQuery>select 1</Pool.PingQuery>
<Pool.PingEnabled>true</Pool.PingEnabled>
<Pool.PingConnectionsOlderThan>0</Pool.PingConnectionsOlderThan>
<Pool.PingConnectionsNotUsedFor>0</Pool.PingConnectionsNotUsedFor>
<Pool.QuietMode>true</Pool.QuietMode>
</local-tx-datasource>
When I start up jboss, jboss comes up, but it lists the following error in the console:
org.jboss.deployment.DeploymentInfo@f6ddd783 { url=file:/C:/Java/JBoss 4.0.4/server/default/deploy/z-pq-DV-ds.xml }
deployer: org.jboss.deployment.XSLSubDeployer@4d2b11
status: null
state: FAILED
watch: file:/C:/Java/JBoss 4.0.4/server/default/deploy/z-pq-DV-ds.xml
altDD: null
lastDeployed: 1165420843219
lastModified: 1165420843209
mbeans:
Then when I go to the application, the first sql hit produces this error:
There was an error configuring JndiDataSourceDaoTransactionPool. Cause: javax.naming.NameNotFoundException: providerqDbInfo not bound
What should I do?
I should note that I set up another application with its jndi file set up in a very similar manner and that has had no problems.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991693#3991693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991693
18 years, 1 month
[JBoss Seam] - Re: Seam JSF question
by gavin.king@jboss.com
anonymous wrote : Is Jboss pushing JSF and if so are they making it easier for developer to work with this framework over the others??
Yes, we thing JSF is good, but we are improving usability and adding some missing features by developing Seam.
anonymous wrote : Have they any feature in there Application server that favour JSf over the other
Not exactly. JSF is a required feature of Java EE 5, so JBoss has JSF built in. But as for us favoring JSF, we favor it in Seam, not so much in the AS.
anonymous wrote : Inside the JBoss App server is it a level playing field for all frameworks
Of course. And on a level field, no other framework can beat Seam, naturally ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991689#3991689
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991689
18 years, 1 month