MyEclipse Forums
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Author Message
support-tony
Post subject:   PostPosted: Apr 30, 2012 - 12:41 PM



Joined: Mar 09, 2011
Posts: 919

Phoenix_133,

Thanks for the details. I haven't yet managed to install Oracle to check this out - I'm having some problems. However, you seem to be raising new issues. You are now getting the NullPointerException when running the reverse engineering. Is this correct?

I'm not clear on your use of a base class. You say it is not in your project but copied in with a shell script. Can you describe this in more detail, as I see errors in the log that might possibly be related.

As the test with the inbuilt Derby database went fine, there doesn't seem to be anything wrong with the base generation tools but you didn't use the inbuilt database in quite the same way, so it's hard to tell. Can you check again, using templates, as you do with Oracle, and, if possible, using the base class technique that you mentioned?

Do you have any issues accessing the Oracle database, generally? Is it local or remote?

Sorry for more questions, rather than answers but until we can replicate the problem, it is difficult to address.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: May 01, 2012 - 05:32 AM



Joined: Mar 09, 2011
Posts: 919

Phoenix_133,

I ran the hibernate reverse engineering against a remote Oracle database (11gR2), with a non-existent base class for the entities. It was certainly a bit slower than running against the inbuilt Derby database, but not too bad.

I ran the tool against the tables in the sample scott schema. Could you try that, if it is available, as a test?

I realise that your database has around 200 tables, which, of course, would take a lot longer. The only thing I haven't used are custom templates. Please try without the templates, to see if that is the problem. Also, please try with a subset of the tables (maybe around 20) to test if it is the number of tables that is the problem.

Please also check the maximum cursors set in the database, as there were a few errors in your log about exceeding the maximum open cursors. Apparently the default is 50 but Oracle recommends setting it to at least 500.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: May 01, 2012 - 12:17 PM



Joined: Mar 09, 2011
Posts: 919

Just a quick note to add that I tried using custom templates (actually, just the standard templates, copied to a different location and used as custom templates) but it still executed fairly quickly. Maybe your templates are complex?

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Phoenix_133
Post subject: Example database Derby in myEclipse missing schema Scott  PostPosted: May 02, 2012 - 10:25 AM



Joined: Apr 25, 2012
Posts: 17

I would like to follow your request and try some more testing on the Scott schema as suggested by you, but after connecting to the DERBY builtin database, I could not find the schema named Scott.

I should also mention, that our company has not yet purchased myEclipse, but this is already set in stone and our department will contact you. Just maybe those issues are due to a trial-version-limitation of myEclipse Blue?

I also updated the cursor settings in ORACLE and set it to 2000. This did sadly not solve my performance issues.
For anyone having the same issues, here is a link to an Oracle article explaining the concepts and default aswell as the recommended settings:
http://www.orafaq.com/node/758

As mentioned before, generating the DAOs was not the issue, therefor the issue with the BaseHibernateDAO not being present is not the problem.

I currently generate the POJOs and DAOs in 4 separate generation runs.
This process would be a lot easier, if I could specify different packages for POJO, Abstract-POJO and DAO. As I am not aware of any such possibility (GUI only offers one field to put in the "Java package", I will have to the following 4-times-generation- approach.

We have tables within the PROD_ADMIN schema:
    The DAOs for the tables within this schema need to be put to package mypackage.beans.dao.admin.
    The pojos for those tables need to be put into the package mypackage.hibernate.admin.
    The generated abstract pojos need to be put into the package mypackage.hibernate.admin.base.


Next, we have tables within the PROD_BASE schema:
    The DAOs for the tables within this schema need to be put to package mypackage.beans.dao.
    The pojos for those tables need to be put into the package mypackage.hibernate.
    The generated abstract pojos need to be put into the package mypackage.hibernate.base.


I currently do this, by triggering the generation process multiple times and selecting the appropritate tables. I also have two hibernate reverse engineering files, selecting the appropirate schemas - one selects the admin schema (hibernate.myEclipse.reveng.xml), the other selects the non-admin schema (hibernate.myEclpiseNonAdmin.reveng.xml):

Some additional info on our environment:
We also use ClearCase (but on commandline, not within Eclipse) for version control.
The project where I want to generate the files to, is located @
/home/percy/workspace/MyProject and the project itself was not created originally with the MyEcilpse Blue Edition, but with a regular Eclipse version and we used JBoss tools before.
The workspace of myEclipse Blue is, however located @ /home/percy/Workspaces/MyEclipse Blue Edition 10/
On using myEcilpse Blue, I imported the existing project, but without copying the files.
I installed myEclipse Blue as standard user percy, but before granted access rights to the install directory.
I was using the standalone download preconfigured version of myEclipse Blue using the link: http://www.myeclipseide.com/Downloads-index-req-getit-lid-152.html
(http://www.myeclipseide.com > Try / Download > myeclipse blue Download-button > MyEclipse Blue Edition 10.1 for WebSphere (Linux) > Download
myEclipse Blue is located @ /opt/eclipseBlue/MyEclipse Blue Edition 10

I tried the tables on the builtin Derby database of schema CLASSICCARS instead, but with my own templates just generating the pojos and mapping files. It works fine within a couple of seconds.

Funny thing is, that when I use my project and reverse engineering, everything works fine when using the myEclipse reverse engineering on our admin-schema,
but it does not like me using the feature on our tables within the nonadmin-schema. When the generation process takes too long, I press
the cancel button, but nothing happens. Then I select the X-button for closing eclipse (upper righthand corner of main GUI of myEclipse). Eclipse saves its workspace and closes all GUIs.

Even only selecting a single table from the nonadmin-schema does not work for generating the POJOs (using our custom templates).
I then tried the generation process on nonadmin-schema tables without our custom templates - still no result.
Next, I tried selecting a single table from the nonadmin-schema and also not using our own templates - still no result.

Looking at the logfile @ /home/percy/Workspaces/MyEclipse Blue Edition 10/.metadata/.log:
Code:
!SESSION 2012-05-02 11:17:16.733 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY com.genuitec.eclipse.core 1 0 2012-05-02 11:17:31.020
!MESSAGE Unable to locate .myeclipse-blue.properties file

!ENTRY com.genuitec.eclipse.hibernate 1 0 2012-05-02 11:17:52.940
!MESSAGE Could not find implementors of IBaseHibernateDAO
!STACK 0
java.lang.ClassCastException: org.eclipse.jdt.core.search.TypeDeclarationMatch cannot be cast to org.eclipse.jdt.core.search.TypeReferenceMatch
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.initializeBaseDAOCombo(NewHibernateArtifactWizardPage.java:702)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.loadProjectProperties(NewHibernateArtifactWizardPage.java:638)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.updatePackageFragmentRoot(NewHibernateArtifactWizardPage.java:521)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.init(NewHibernateArtifactWizardPage.java:976)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.createPageControls(NewHibernateMappingWizard.java:212)
        at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
        at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
        at org.eclipse.jface.window.Window.create(Window.java:431)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.basicRun(NewHibernateMappingAction.java:68)
        at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
        at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.run(NewHibernateMappingAction.java:82)
        at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        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:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)


Next, I try to upload my posting and show a preview (by pressing the Preview-button), I get the error message on your Apache:
"You don't have permission to access /PNphpBB2-posting-sid-2edb006b11859178d764dc2d863424fa.html on this server." Never had this one before.
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: May 02, 2012 - 12:06 PM



Joined: Mar 09, 2011
Posts: 919

Phoenix_133,

Thanks for the comprehensive information and the additional testing you've done.

When I referred to the SCOTT schema, that was in the Oracle database. It is installed as a sample, so might not be in your Oracle database. Also, the scott user may be disabled (it is by default).

However, from your extensive testing, it seems that the problem lies with your non-admin schema in some way. Did you try different single tables from that schema, just to make sure that you weren't unlucky in selecting the one or few tables that actually cause the problem?

I'm not sure how to help with this particular problem as it seems to be specific to your database. Do you have any trouble accessing those non-admin tables with the Database Explorer?

One thing you might investigate is creating a separate java project (just to test this), adding JPA capability (selecting hibernate in the wizard) and seeing if the JPA reverse engineering is any better for your situation.

In terms of separate packages for the DAOs and POJOs, this is the first time I've seen this use but we could consider raising an improvement request. However, I wouldn't be able to guarantee when, of if, it would get implemented.

Regarding your problem with previewing your post, I've also seen this but it seems to be a transient problem. Please let us know if you see it again.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Phoenix_133
Post subject: Small breakthrough using different login to DB  PostPosted: May 03, 2012 - 03:35 PM



Joined: Apr 25, 2012
Posts: 17

I have tried out quite a few different JDBC drivers.
I even tested out generating artifacts by selecting only a single table from my NON-ADMIN schema. Did not work.

I then switched the user of the ORACLE login. Before, I was using the SYSTEM user for the Oracle database. This is like the user root for Linux or an admin, who is god and may do all sorts of silly things.

After I switched the user of the database login to a non-admin user, reverse-engineering of POJOs on non-ADMIN-schemat seemed to work with odjbc14.jar and ojdbc6.jar on a single selected table. I even tried different ones and it still worked.

It is still quite slow, but at least one table is reverse engineered within less than 5 minutes. Next, I tried selecting more than one table at a time for reverse engineering - it took so long, that I aborted it after aprox. 13 minutes. Again - most of the time, my PC was bored... CPU usage was neglectable until it started the actual reverse engineering. When the progress bars on reverse engineering appeard in myEclipse, it was only a matter of seconds, before it was done. But the wait until the progress bars appaer... as I said above: a few minutes.

On reverse engineering, II also used my custom templates and my own hibernate.myEcilpse.reveng.xml
It took about 3 long minutes for a single table, also got a stacktrace on myEclipse, but it worked nevertheless. Here is the stacktrace from .log file of myEclipse:

Code:
!ENTRY com.genuitec.eclipse.hibernate 1 0 2012-05-02 14:40:51.539
!MESSAGE Could not find implementors of IBaseHibernateDAO
!STACK 0
java.lang.ClassCastException: org.eclipse.jdt.core.search.TypeDeclarationMatch cannot be cast to org.eclipse.jdt.core.search.TypeReferenceMatch
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.initializeBaseDAOCombo(NewHibernateArtifactWizardPage.java:702)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.loadProjectProperties(NewHibernateArtifactWizardPage.java:638)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.updatePackageFragmentRoot(NewHibernateArtifactWizardPage.java:521)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateArtifactWizardPage.init(NewHibernateArtifactWizardPage.java:976)
        at com.genuitec.eclipse.hibernate.wizards.NewHibernateMappingWizard.createPageControls(NewHibernateMappingWizard.java:212)
        at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:736)
        at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:608)
        at org.eclipse.jface.window.Window.create(Window.java:431)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.basicRun(NewHibernateMappingAction.java:68)
        at com.genuitec.eclipse.core.ui.action.LicenseValidatingAction.run(Unknown Source)
        at com.genuitec.eclipse.hibernate.action.NewHibernateMappingAction.run(NewHibernateMappingAction.java:82)
        at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        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:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1386)


I will keep you posted on any update on this.
 
 View user's profile Send private message  
Reply with quote Back to top
Phoenix_133
Post subject: Usability and stupid user problem  PostPosted: May 03, 2012 - 03:58 PM



Joined: Apr 25, 2012
Posts: 17

I found a major mistake I did:

On generating the POJOs, I get the window with the title "Generating Artifacts".
Because the item "Generating Artifacts" took up so much space, I did not see, that there were other processes running before the actual generation process.
If you scroll down, you can see those other processes:

* Validating
* Building workspace

Can I configure myEclipse to skip those two processes on generating the artifacts? As we know now, this takes up a lot of time.

I also included two screenshots to show you, that I just missed the fact, that when scrolling down, you will find additional processes running before doing the reverse engineering.
Once I know how to remove the "Building workspace" and "Validating" feature on reverse engineering, I will let you know, what the outcome of the "performance" issue is.

I hope, the next update will include an update to this window, so that the entry "Generating Artifacts" occupies less vertical space.
Sorry about the mess, so far.
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: May 04, 2012 - 05:52 AM



Joined: Mar 09, 2011
Posts: 919

Phoenix_133,

Try turning off the automatic build by clicking on Project->Build Automatically from the menu bar. That may also stop validation. If not, right click in the Package Explorer on the project you're generating into and go to MyEclipse->Manage Validation, then enable project specific settings and disable all validators - just to check the effect on reverse engineering. I don't have a database schema that takes long enough for me to check on the validators though I didn't see a workspace build when I turned off automatic building.

I've raised a bug report for that "Generating Artifacts" entry being far too large. It's easy to see why you missed the other background processes being executed.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Phoenix_133
Post subject: Thanks for your help!  PostPosted: May 04, 2012 - 08:33 AM



Joined: Apr 25, 2012
Posts: 17

Hi again,

thanks for your hint on how to deactivate the automatic build.
I deselected Menu > Project > Build Automatically and it worked like a charm.
I am now all set to go.
Thanks a lot for all your help. You rock!
 
 View user's profile Send private message  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: May 04, 2012 - 09:06 AM



Joined: Mar 09, 2011
Posts: 919

Hi Phoenix_133,

You make me blush! Thanks for getting back to us and for the compliment. I'm glad we could be of service.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits