MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
malov
Post subject: [Closed] Problem creating Hibernate mapping, Sybase, 4.1GA  PostPosted: Jan 31, 2006 - 12:36 AM
Registered Member
Registered Member


Joined: Jan 20, 2006
Posts: 13

While trying to create hibernate mapping for my db tables (Sybase ASE 12.5.3), I got a message

---- An internal error occurred during: "Generating Artifacts".

Further investigating I found that SQL Message causing error is (it can be seen from the error log below):

---- The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.

This error in Sybase can be avoided by setting "ddl in tran" option for tempdb to "true", and that's what I did in my case to solve this problem. However, I must note that Sybase itself does not recommend doing so in its manual, suggesting instead to use permanent objects:

---- Quote from the manual ----
Using data definition language commands on tempdb within transactions may cause concurrency problems in tempdb. Always leave ddl in tran set to FALSE in tempdb!
---- End of quote ------

Although it's not technically a bug (requirement to set "ddl in tran" to "true" for Sybase server), I would be very much like to know how to get around this problem, because, for example, it will prevent me from using this otherwise very interesting plugin at work, where setting options for databases is not something I'm allowed to do.

Regards,
Sergey

----------------------------------- Configuration ----------------------------------------
*** Date: Mon Jan 30 19:22:33 EST 2006

*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_05

*** MyEclipse details:
MyEclipse Enterprise Workbench

Version: 4.1.0 GA
Build id: 20060122-4.1-GA

*** Eclipse details:
Eclipse SDK

Version: 3.1.1
Build id: M20050929-0840

Eclipse Platform

Version: 3.1.1
Build id: M20050929-0840

Eclipse RCP

Version: 3.1.1
Build id: M20050929-0840

Eclipse Java Development Tools

Version: 3.1.1
Build id: M20050929-0840

Eclipse Plug-in Development Environment

Version: 3.1.1
Build id: M20050929-0840

Eclipse Project SDK

Version: 3.1.1
Build id: M20050929-0840

Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Development\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
1f8_38
-vm
C:\WINDOWS\system32\javaw.exe
------------------------------------------- End of Configuration --------------------------------


--------------------------------- Error log ------------------------------------------

!SESSION 2006-01-29 22:15:48.804 -----------------------------------------------
eclipse.buildId=M20050929-0840
java.version=1.5.0_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

!ENTRY com.genuitec.eclipse.core 1 0 2006-01-29 22:15:52.694
!MESSAGE Unable to locate .myeclipse.properties file

!ENTRY org.eclipse.core.runtime 4 2 2006-01-29 22:17:26.897
!MESSAGE An internal error occurred during: "Generating Artifacts".
!STACK 0
org.hibernate.exception.GenericJDBCException: Error while reading column meta data for Library.dbo.Author
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:231)
at org.hibernate.cfg.reveng.JDBCReader.processBasicColumns(JDBCReader.java:434)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:67)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration$1.readDatabaseSchema(MEJDBCMetaDataConfiguration.java:82)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:85)
at com.genuitec.eclipse.hibernate.wizards.MEJDBCMetaDataConfiguration.readFromJDBC(MEJDBCMetaDataConfiguration.java:109)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob$5.execute(GenerateArtifactsJob.java:393)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.buildConfiguration(GenerateArtifactsJob.java:388)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:255)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Caused by: com.sybase.jdbc3.jdbc.SybSQLException: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.

at com.sybase.jdbc3.tds.Tds.a(Unknown Source)
at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source)
at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source)
at com.sybase.jdbc3.jdbc.SybCallableStatement.executeQuery(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDatabaseMetaData.if(Unknown Source)
at com.sybase.jdbc3.jdbc.SybDatabaseMetaData.getColumns(Unknown Source)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getColumns(JDBCMetaDataDialect.java:209)
... 11 more
------------------------------------------ End of error log ---------------------------------------------
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Jan 31, 2006 - 08:50 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2518

Malov,

There is no known work around for this behaviour right now, it was only recently that another user brought it to our notice; but we didn't realize it was a problem as you pointed out.

I have filed an investigative report so that we can take a look at this internally, but for now I'm afraid you just have to set that option to true in order to use our tools with Sybase.

Best,
Brian.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
wici
Post subject:   PostPosted: Jan 31, 2006 - 09:02 AM
Registered Member
Registered Member


Joined: Jan 31, 2006
Posts: 1

Malov, Brian

we found exactly the same problem the other day and this is quite annoying, because we are certainly not allowed to set the "ddl in tran" flag to true in tempdb, since it is not recommended. In addition to your finding we've also tried myEclipse 4.0.3 and the hibernateTools and interestingly enough it still worked with 4.0.3 and also with the older version of the hibernateTools, but not with the latest 4.1GA and the latest hibernateTools.

Regards,
Andreas
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Jan 31, 2006 - 09:33 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2518

Andreas,

Thank you for chipping in with your experience. We changed our Hibernate tooling to use the Hibernate Tools project since 4.1M2, so the older tooling (pre 4.1M2) would still work, albeit it was neither as powerful nor as flexable.

Quote:
interestingly enough it still worked with 4.0.3 and also with the older version of the hibernateTools, but not with the latest 4.1GA and the latest hibernateTools.


When you say older version of hibernate tools, are you referring to our hibernate tools in 4.0.3 or are you referring to the open source Hibernate Tools project? Similarly, when you say latest hibernateTools, could you please clarify what you are referring to?

Best,
Brian.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
malov
Post subject:   PostPosted: Jan 31, 2006 - 07:43 PM
Registered Member
Registered Member


Joined: Jan 20, 2006
Posts: 13

Brian, Andreas,
Thank you for your replies.
Brian, if there will be any changes in this behaviour in the future, let me know. Frankly, I think it would be a good idea, since there are still a lot of us, poor souls, who have to work with Sybase once in a while to get some money for living :)

Regards,
Sergey
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Feb 02, 2006 - 04:29 PM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2518

Seedless, your query has been moved since it does not pertain to Sybase: http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=11210

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-snpe
Post subject:   PostPosted: Feb 14, 2006 - 01:40 AM
Moderator
Moderator


Joined: Feb 03, 2006
Posts: 1117

Malov,

I can reproduce your problem with simple schema.It will be resolved in next release Please, send us your schema for added testing (if you can do it)

You can try with next workaround, too : start eclipse with options
-vmargs -Dhibernate.connection.autocommit=true

Sybase (and MSSQL too, it is same engine) have bad locking mechanism and it is reason for this problem/bug
(it is reason for 'ddl in tran' at all)

Best
 
 View user's profile Send private message  
Reply with quote Back to top
malov
Post subject:   PostPosted: Feb 16, 2006 - 02:19 AM
Registered Member
Registered Member


Joined: Jan 20, 2006
Posts: 13

Sorry for a late response, I thought the matter is resolved and didn't check for messages. I'll try this workaround next time I work with the project.
I can send you db schema if it's still needed, where do you want me to it?

Regards,
Sergey
 
 View user's profile Send private message  
Reply with quote Back to top
support-snpe
Post subject:   PostPosted: Feb 16, 2006 - 02:28 AM
Moderator
Moderator


Joined: Feb 03, 2006
Posts: 1117

malov,

We resolve this bug (sybase problem) and this workaround can help you temporary.
When you start with this option you can't execute stored procedures - it will be resolved in 4.1.1 (late Februar)

I would like try with your schema and you can send on forum or to private mail (click on link 'You have X new messages' or 'You have no new messages' and you will see link for send private mail)

Best
 
 View user's profile Send private message  
Reply with quote Back to top
malov
Post subject:   PostPosted: Feb 21, 2006 - 04:35 PM
Registered Member
Registered Member


Joined: Jan 20, 2006
Posts: 13

Just curious, when this new release is going to happen? It's late February on my watches :)

Regards,
Sergey
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Feb 21, 2006 - 04:53 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Later February, towards the end. We are actually surprised how much we got into 4.1.1, it's going to be a great release.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
SreecharanPannala
22 Post subject: An internal Error occurred while Generating Artifacts  PostPosted: Sep 25, 2006 - 10:08 PM



Joined: Sep 25, 2006
Posts: 3

Hi,
I am new to this forum. Please bear with me.
I am using Oracle 8 as my DB, Win-XP, My-Eclipse 4.1.1.
I added the classes12.zip file for connecting to the DB but i still get the same error
"An internal Error occurred while Generating Artifacts". while generating the mapping files using Hibernate capabilities on My-Eclipse. :?
Could anybody please suggest me what to do to get rid of this error?
Please suggest me a step-by-step process if there is any.

Thanks in advance
--Sreecharan
 
 View user's profile Send private message  
Reply with quote Back to top
support-snpe
Post subject:   PostPosted: Sep 25, 2006 - 11:20 PM
Moderator
Moderator


Joined: Feb 03, 2006
Posts: 1117

Sreecharan,

Try with ojdbc14.jar (jdbc for java 1.4/5.0) - you can find driver on http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
jdbc driver version 9 and 10 will work with datbase >= 8.1.7

If you have further issues send us log
Windows-Show View-Other-PDE runtime-Error log View

... and please, open new thread

Best
Peco
 
 View user's profile Send private message  
Reply with quote Back to top
SreecharanPannala
7 Post subject: No more Errors while generating the Mapping files  PostPosted: Sep 27, 2006 - 05:38 PM



Joined: Sep 25, 2006
Posts: 3

Thank you very much,
It worked!!! :-)

Regards
--Sreecharan
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 03, 2006 - 01:23 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Glad it's working.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits