[JBoss JIRA] Created: (JBDS-1451) RevEng not allows to extend Beans
by Peter Rader (JIRA)
RevEng not allows to extend Beans
---------------------------------
Key: JBDS-1451
URL: https://jira.jboss.org/browse/JBDS-1451
Project: Developer Studio (JBoss Developer Studio)
Issue Type: Bug
Affects Versions: 4.0.0.Beta1
Environment: winxp jdk6
Reporter: Peter Rader
Priority: Minor
hibernate.reveng.xml:
<hibernate-reverse-engineering>
<table-filter match-schema="public" match-name=".*">
<meta attribute="extends">xx.xxx.Base</meta>
</table-filter>
</hibernate-reverse-engineering>
Beans does not extends from "xx.xxx.Base"!
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBIDE-5461) NullPointerException when reverse engineering
by Olivier Cailloux (JIRA)
NullPointerException when reverse engineering
---------------------------------------------
Key: JBIDE-5461
URL: https://jira.jboss.org/jira/browse/JBIDE-5461
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.2.next
Environment: Using eclipse Platform Version: 3.5.1 Build id: M20090917-0800 on debian etch, Hibernate Tools 3.2.4.v200909151014R-H192-GA
Reporter: Olivier Cailloux
This error appears when reverse engineering (trying to generate Java5 EJB3 code) a mysql database:
java.lang.NullPointerException
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:77)
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1263)
at org.hibernate.cfg.JDBCMetaDataConfiguration.secondPassCompileForeignKeys(JDBCMetaDataConfiguration.java:33)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1170)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:318)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:94)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:285)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:218)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:138)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
You will find herebelow the sql schema, to import into a mysql 5.0 database. I used mysql --default-character-set=utf8 to import it.
The error does not happen if the last line of the schema (adding a foreign key) is removed.
Thanks for any help.
----
DROP TABLE IF EXISTS Catégorie;
CREATE TABLE Catégorie
(
ID Int8
);
DROP TABLE IF EXISTS Transaction;
CREATE TABLE Transaction
(
Compte_positif Int8
);
alter table Catégorie ADD INDEX(ID);
alter table Transaction add constraint youpee foreign key (Compte_positif) references Catégorie(ID);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBIDE-7568) Code generation for JPA 2.0 uses old features
by Juergen Zimmermann (JIRA)
Code generation for JPA 2.0 uses old features
---------------------------------------------
Key: JBIDE-7568
URL: https://jira.jboss.org/browse/JBIDE-7568
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.2.0.Beta1
Reporter: Juergen Zimmermann
Assignee: Max Andersen
When choosing JPA 2.0 for code generation, then @OneToMany and @ManyToOne still generates relationships as in JPA 1.0. But the JPA 2.0 style is definitely better esspecially when it comes to unidirectional relationships where you just want to delete one side of the bidirectional relationship.
Example: one customer has many orders
@Entity
@Table(name = "customer")
public class Customer implements Serializable {
...
@OneToMany
@JoinColumn(name = "customer_fk") // foreign key in table "order"
private Set<Order> orders;
@Entity
@Table(name = "order")
public class Order implements Serializable {
...
@ManyToOne
@JoinColumn(name = "customer_fk", insertable = false, updatable = false)
private Customer customer;
As you can see: the foreign key is declared at both sides of the relationship so that one side can easily ommitted to just have a unidirectional relationship.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBIDE-7441) Move FakeTransactionManagerLookup from Tools UI to Core
by Vitali Yemialyanchyk (JIRA)
Move FakeTransactionManagerLookup from Tools UI to Core
-------------------------------------------------------
Key: JBIDE-7441
URL: https://jira.jboss.org/browse/JBIDE-7441
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: Hibernate
Affects Versions: 3.2.0.Beta2
Reporter: Vitali Yemialyanchyk
Assignee: Max Andersen
Priority: Minor
it is necessary to move FakeTransactionManagerLookup from Hibernate Tools UI to Hibernate Tools Core.
This is necessary because run code generation from external process required to be equal with ordinal codegen.
All versions of Hibernate require to use this workaround with FakeTransactionManagerLookup, if
hibernate.transaction.manager_lookup_class is an empty string.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBIDE-4297) Error while performing background reading of database schema
by Krasimir Goutcev (JIRA)
Error while performing background reading of database schema
------------------------------------------------------------
Key: JBIDE-4297
URL: https://jira.jboss.org/jira/browse/JBIDE-4297
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Environment: JBT nightly build 3.1.0.Alpha1/200905091201
eclipse.buildId=N20090426-1232
java.version=1.5.0_15
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=bg_BG
Command-line arguments: -os win32 -ws win32 -arch x86 -clean
Reporter: Krasimir Goutcev
1.Open some ....hbm.xml file
2.Click on table="|" or <column name="|".../> and try CA
org.hibernate.cfg.JDBCBinderException: Duplicate class name 'AllFileGroups' generated for 'org.hibernate.mapping.Table(SYS._ALL_FILE_GROUPS)'. Same name where generated for 'org.hibernate.mapping.Table(SYS._ALL_FILE_GROUPS)'
at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:172)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:95)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:42)
at org.hibernate.eclipse.nature.HibernateNature$ReadDatabaseMetaData$1.execute(HibernateNature.java:158)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:95)
at org.hibernate.eclipse.nature.HibernateNature$ReadDatabaseMetaData.run(HibernateNature.java:156)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBIDE-7562) "Use generation in external process" is not workable in case "Schema Documentation (.html)" use for Seam 2.2 Booking example
by Vitali Yemialyanchyk (JIRA)
"Use generation in external process" is not workable in case "Schema Documentation (.html)" use for Seam 2.2 Booking example
----------------------------------------------------------------------------------------------------------------------------
Key: JBIDE-7562
URL: https://jira.jboss.org/browse/JBIDE-7562
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: Hibernate
Affects Versions: 3.2.0.Beta2
Reporter: Vitali Yemialyanchyk
Assignee: Vitali Yemialyanchyk
Fix For: 3.2.0.CR1
1) new Project example -> Seam 2.2 Booking example -> http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
2) add hibernate-tools-core.jar into booking22-ejb libs;
3) create Hibernate Code gen configuration with "Schema Documentation (.html)" exporter selected based on "booking22-ejb" Hibernate Console Configuration;
4) in case "Use generation in external process" checked Hibernate Code gen does not work
to find what is an error:
5) export Hibernate Code gen configuration to ant script;
6) run this ant script with -verbose argument - result stacktrace:
>>>
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: C:\Users\vitali.ELTEGRA\workspace8\booking22\src\zzz.xml
parsing buildfile C:\Users\vitali.ELTEGRA\workspace8\booking22\src\zzz.xml with URI = file:/C:/Users/vitali.ELTEGRA/workspace8/booking22/src/zzz.xml
Project base dir set to: C:\Users\vitali.ELTEGRA\workspace8\booking22\src
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `hibernateAntCodeGeneration' is [hibernateAntCodeGeneration]
Complete build sequence is [hibernateAntCodeGeneration, ]
hibernateAntCodeGeneration:
[hibernatetool] Executing Hibernate Tool with a JPA Configuration
[hibernatetool] 1. task: hbm2doc (Generates html schema documentation)
[hibernatetool] SLF4J: Class path contains multiple SLF4J bindings.
[hibernatetool] SLF4J: Found binding in [jar:file:/D:/Bin/jbdevstudio_beta1/jboss-eap/jboss-as/client/slf4j-jboss-logging.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[hibernatetool] SLF4J: Found binding in [jar:file:/D:/Bin/jbdevstudio_beta1/jboss-eap/jboss-as/client/slf4j-jboss-logging.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[hibernatetool] SLF4J: Found binding in [jar:file:/D:/Bin/jbdevstudio_beta1/jboss-eap/jboss-as/common/lib/slf4j-jboss-logging.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[hibernatetool] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[hibernatetool] An exception occurred while running exporter #2:hbm2doc (Generates html schema documentation)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup ''
BUILD FAILED
C:\Users\vitali.ELTEGRA\workspace8\booking22\src\zzz.xml:285: org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup ''
at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup ''
at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:93)
at org.hibernate.cfg.SettingsFactory.createTransactionManagerLookup(SettingsFactory.java:439)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:163)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2111)
at org.hibernate.tool.hbm2x.doc.DocHelper.<init>(DocHelper.java:135)
at org.hibernate.tool.hbm2x.DocExporter.setupContext(DocExporter.java:277)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:94)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
... 16 more
--- Nested Exception ---
org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup ''
at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:93)
at org.hibernate.cfg.SettingsFactory.createTransactionManagerLookup(SettingsFactory.java:439)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:163)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2111)
at org.hibernate.tool.hbm2x.doc.DocHelper.<init>(DocHelper.java:135)
at org.hibernate.tool.hbm2x.DocExporter.setupContext(DocExporter.java:277)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:94)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
Total time: 5 seconds
>>>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (JBIDE-4269) Provide a way to filter out elements which will be generated by exporter.
by Dmitry Geraskov (JIRA)
Provide a way to filter out elements which will be generated by exporter.
-------------------------------------------------------------------------
Key: JBIDE-4269
URL: https://jira.jboss.org/jira/browse/JBIDE-4269
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: Hibernate
Affects Versions: 3.1.0.M1
Reporter: Dmitry Geraskov
Assignee: Dmitry Geraskov
Fix For: 3.1.0.M1
Now exporter uses Configuration object to get for example pojo's for generation.
After this it calls generation for each of them.
We need to add some filter for this.
First place for such injection is ArtifactCollector as developer can easily specify subclass of this class and set it to exporter.
Also TemplateProducer which used for files generating always gets ArtifactCollector object in constructor from exporter and has access to it.
I' going to add methods filter(Map context), setFilter(Filter) to ArtifactCollector class and call it when necessary in template producer.
Method 'filter' by default will not filter out anything. Non default realizations should use context map to get any objects which is passed to template producer.
Second variant is to add Filter field to Generic exporter and call for filtering in GenericExporter.exportPOJO() method(or in each realization of ModelIterator.process()).
I prefer first way.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months