[Fwd: [jbosstools-commits] JBoss Tools SVN: r3757 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view: src/org/jboss/tools/hibernate/ui/view/views and 1 other directory.]
by Max Rydahl Andersen
Hi Michael,
Great that you are trying to fix JBIDE-611.
Got some comments on that:
1) Any way that this could be done in the hibernate tools plugin
instead of the unrelated diagram plugin ? (I don't see you are using any
new plugins for this so should be in the core of hibernate tools imo)
2) Please don't use bogus id's in our plugin.xml like: com.xyz.runXYZ,
it should be something stable and resembling the other id's.
3) This code looks like it is assuming everything are done in mapping
files and with a cfg.xml file; is that correct ? What about annotated
classes?
4) you have copied a large chunk of code from hibernate tools plugin to
locate the default project; why don't you use the existing code for that ?
/max
18 years
Re: Fixed issues (testNG)
by Max Rydahl Andersen
Hi Denis,
> I have first update in CVS for EAR deployment it works for this case:
> 1. Create Seam project in EAR deployment
> 2. Create for or action for created project
> 3. Select test xml from test project and run it by Run As/TestNG Suite
>
> test shoud pass now without errors.
Awsome ;)
Any changes needed in the seamgen related files ?
> Now I'm finishing te WAR configuration, need to do:
> Setup Web App Libraries as Exported in web projeject to fix tests
> compilation error.
ok.
> After I have it there will be a problem with datasource.xml (see below).
> Any Ideas how to fix it?
Peter - can you step in here and come with suggestions to where the
datasource should be when running tests on war's (in this case there are
no EJB/EAR....where would one put it then ?
Or does this actually require a different persistence.xml with
hibernate.connection properties ?
Denis - have you looked in how seam-gen runs tests for wars ?
/max
> 12:40:23,421 WARN [Ejb3Configuration] Overriding
> hibernate.transaction.factory_class is dangerous, this might break the
> EJB3 specification implementation
> 12:40:23,515 INFO [NamingHelper] JNDI InitialContext
> properties:{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory,
> java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
> 12:40:23,515 FATAL [DatasourceConnectionProvider] Could not find
> datasource: java:/testweb56Datasource
> javax.naming.NameNotFoundException: testweb56Datasource not bound
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
> at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
> at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at
> org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
>
> at
> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
>
> at
> org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
>
> at
> org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
> at
> org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
> at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
>
> at
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
>
> at
> org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
>
> at
> org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
>
> at
> org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
>
> at
> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
>
> at
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
>
> at
> org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:74)
>
> 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.jboss.seam.util.Reflections.invoke(Reflections.java:20)
> at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
> at org.jboss.seam.Component.callComponentMethod(Component.java:1842)
> at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
> at org.jboss.seam.Component.newInstance(Component.java:1746)
> at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
> at
> org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
> at org.jboss.seam.init.Initialization.init(Initialization.java:504)
> at org.jboss.seam.mock.SeamTest.init(SeamTest.java:701)
> 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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
> at
> org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
> at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
> at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
> at
> org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
>
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
> at org.testng.TestRunner.runWorkers(TestRunner.java:678)
> at org.testng.TestRunner.privateRun(TestRunner.java:624)
> at org.testng.TestRunner.run(TestRunner.java:495)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
> at org.testng.SuiteRunner.run(SuiteRunner.java:190)
> at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
> at org.testng.TestNG.run(TestNG.java:699)
> at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
> at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)
> FAILED CONFIGURATION: @BeforeClass init
> javax.persistence.PersistenceException:
> org.hibernate.HibernateException: Could not find datasource
> at
> org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:217)
>
> at
> org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:114)
>
> at
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37)
>
> at
> org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:74)
>
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
> at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
> at org.jboss.seam.Component.callComponentMethod(Component.java:1842)
> at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
> at org.jboss.seam.Component.newInstance(Component.java:1746)
> at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
> at
> org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
> at org.jboss.seam.init.Initialization.init(Initialization.java:504)
> at org.jboss.seam.mock.SeamTest.init(SeamTest.java:701)
> Caused by: org.hibernate.HibernateException: Could not find datasource
> at
> org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
>
> at
> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
>
> at
> org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
>
> at
> org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
> at
> org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
> at
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
>
> at
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
>
> at
> org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
>
> at
> org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
>
> at
> org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
>
> ... 38 more
> Caused by: javax.naming.NameNotFoundException: testweb56Datasource not
> bound
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
> at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
> at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at
> org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
>
> ... 47 more
> ... Removed 26 stack frames
> SKIPPED CONFIGURATION: @BeforeMethod begin
> SKIPPED CONFIGURATION: @AfterMethod end
> SKIPPED CONFIGURATION: @AfterClass cleanup
> SKIPPED: test
>
> Thanks
> Denis
>
> Max Rydahl Andersen wrote:
>>
>>> http://jira.jboss.com/jira/browse/JBIDE-906 - Create TestNG project
>>> for Seam
>>> Project created in the same configuration as seam-gen does: with
>>> components.properties for Web and test projects. Web project has
>>> enbedded-ejb disabled, test vice versa.
>>> I'd say it fixed, but some configuration issues with class path
>>> should be fixed
>>
>> fyi - I got a greenlight testng run now after some twiddling.
>>
>> I'm still investigating *exactly* why these tweaks are needed and if
>> they have any effect other places but in short it is:
>>
>> 1) On web project only jboss-seam.jar is exposed on the classpath need
>> to add the remaining jars in project properties/J2ee Module dependencies
>> (this makes drools/security issues go away). This modifies manfiest.mf
>> which might effect how jboss 4.2 load classes so need to investigate
>> if this should work or not.
>>
>> 2) Reorder the exported classpath on test to have the ear/ejb/war
>> project at the *end* so the *-all.jar takes effect (this removes the
>> weird NPE's which is probably caused by a mix of
>> jbossxb/microcontainer from jboss 4.2 and the embedded ejb)
>>
>> 3) JarArchiveBrowser can't handle spaces so if your workspace is in
>> c:/Document Settings/yadayda then you will get more weird errors. Move
>> it to e.g. c:/rhdevstudio/workspace to make it work)
>>
>> The bad news is that it feels very fragile having these very different
>> jars, but i guess that's life in JEE java ;(
>>
>> In any case the good news is that these are all explainable and
>> fixable things.
>>
>> The extra good news is that all of the guys who have worked on these
>> libs/jars will be in Neuchatel next week so they can buy me a beer or
>> get beaten with a stick ;)
>>
>> /max
>>
>
18 years
JBoss AS adapter problems
by Denis Golovin
Rob,
I've just noticed that seam-ear projects are not started after
deployment. After deployment exploded EAR folder appears in deploy
directory and its structure looks fine, but after server is being
started ejb jar is added to deploy folder also. It happens all the time.
Sometimes war folder from ear is duplicated right into deploy folder, so
there are two the same wars one in ear folder structure and another one
right in deploy directory. Two ejb: exploded in ear folder and jar in
deploy folder. All these war and ejb's jar files in deploy folder lead
to errors during starting seam ear project.
for example, there is a problem with conflicted datasources
org.jboss.deployment.DeploymentException: Trying to install an already
registered mbean: jboss.jca:service=LocalTxCM,name=seam99Datasource
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:103)
at
org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
at
org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at
org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
it happens only when JBoss AS server started form Eclipse if remove all
unnecessary wars and jars and start JBoss from command line it works.
I didn't create a jira issue yet, just want to ask you look at it. Can
you reproduce it locally or that is only my local problem?
Thanks
Denis
18 years
[Fwd: [wtp-releng] Ready for RC3? 2.0.1 release?]
by Max Rydahl Andersen
Last chance for fixing WTP 2.0.1 ;)
If you know of any issue that is important for us but is not marked as
critical and PMC in Eclipse's bug system then speak up so we can raise
it ASAP.
Thanks ;)
/max
18 years
Seam Project Naming / Deploy Error
by Rob Stryker
Short summary:
due to a WTP error, projects / modules with the same deploy path will be
mistaken for each other. 100%. This is a bug. I know it, and I've filed
with eclipse to let them know this.
We are experiencing this bug right now in the seam plugins. The dynamic
web project (named seampro) and the EAR project (named seampro-ear) both
have the same deploy path: Seampro. They also both have the same
"ModuleFactory". This means eclipse will regularly mistake one for the
other. Links are below.
Workaround:
Make sure the deploy path of the web project is not the same as the
deploy path for the ear project. I don't know where this code is and I'm
busy tracking down other things right now. Hope this helps someone.
Again, this is a pretty important use case.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=202541
http://jira.jboss.org/jira/browse/JBIDE-759
18 years