[JBoss Tools (users)] - Re: Problem with JBoss AS 5.0.0CR1
by baz
Have tried it now with JBT 2.1.2
Created a new seam project in the workspace where i have already defined an as5 server and the datasource
Target Runtime JBoss 5.0 Runtime
Target Server JBoss 5.0 Server
Configurations Dynamic Web Project with Seam 2.0
Seam runtime 2.0.3CR1
After generation of this project i run Seam generate Entities
Starting the server yields the same behaviour:-(
Any idea what the reason is for this issue ?
| 07:46:30,343 INFO [ServerImpl] Home Dir: E:\IDE\jboss-5.0.0.CR1
| 07:49:24,781 INFO [StandardService] Starting service jboss.web
| 07:49:24,781 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.1.CR3
| 07:49:24,875 INFO [Catalina] Server startup in 93 ms
| 07:49:27,109 INFO [NativeServerConfig] 3.0.2.GA
| 07:49:30,375 INFO [TomcatDeployment] deploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war
| 07:49:31,640 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
| 07:49:31,750 INFO [TomcatDeployment] deploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war
| 07:49:31,890 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
| 07:49:31,937 INFO [TomcatDeployment] deploy, ctxPath=/jbas5, vfsUrl=jbas5.war
| 07:49:31,984 WARN [WebResourceHandler] Ignoring invalid TimerService resource-env-ref
| 07:49:32,125 WARN [WebResourceHandler] Ignoring invalid TimerService resource-env-ref
| 07:49:34,453 INFO [ServletContextListener] Welcome to Seam 2.0.3.CR1
| 07:49:42,906 INFO [Contexts] starting up: jbas5EntityManagerFactory
| 07:49:43,062 INFO [Version] Hibernate Annotations 3.4.0.CR1
| 07:49:43,093 INFO [Environment] Hibernate 3.3.0.CR1
| 07:49:43,109 INFO [Environment] hibernate.properties not found
| 07:49:43,125 INFO [Environment] Bytecode provider name : javassist
| 07:49:43,140 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
| 07:49:43,359 INFO [Version] Hibernate Commons Annotations 3.1.0.CR1
| 07:49:43,359 INFO [Version] Hibernate EntityManager 3.4.0.CR1
| 07:49:44,671 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 07:49:44,671 ERROR [DatasourceConnectionProvider] Could not find datasource: java:/jbas5Datasource
| javax.naming.NameNotFoundException: jbas5Datasource not bound
| 07:49:44,703 INFO [TomcatDeployment] deploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war
| 07:49:44,953 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jbas5Datasource' to JNDI name 'java:jbas5Datasource'
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162436#4162436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162436
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - 5.0.0CR1: deployment error with @PersistenceContext and @Ign
by Juergen.Zimmermann
An exploded EAR deploys and runs fine with JBossAS 4.2.2. Adapting some DTD declarations and package names I tried the deployment with for 5.0.0CR1 and failed. The stacktrace is below.
The problem:
- KundenverwaltungBean is a SLSB and references the SLSB BestellverwaltungBean via its interface Bestellverwaltung
- The reference is declared with @PersistenceContext and @IgnoreDependency because BestellverwaltungBean also has a reference back to KundenverwaltungBean via its interface Kundenverwaltung
- BestellverwaltungBean has a field "em" of type EntityManager being annotated with @PersistenceContext(name="hskaPersistence")
- hskaPersistence is the name of <persistence-unit> inside META-INF/persistence.xml
Here is the stacktrace. Any hint is appreciated! Is this a bug in the hot deployment scanner?
2008-07-04 06:00:55,388 INFO [org.apache.coyote.ajp.AjpAprProtocol] (main) Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009
| 2008-07-04 06:00:55,398 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200806301254)] Started in 1m:10s:120ms
| 2008-07-04 06:01:14,105 INFO [STDOUT] (HDScanner) ======> Creating interceptor metadata bridge
| 2008-07-04 06:01:14,816 INFO [STDOUT] (HDScanner) ======> Creating interceptor metadata bridge
| 2008-07-04 06:01:14,866 INFO [STDOUT] (HDScanner) ======> Creating interceptor metadata bridge
| 2008-07-04 06:01:15,007 INFO [STDOUT] (HDScanner) ======> Creating interceptor metadata bridge
| 2008-07-04 06:01:15,137 WARN [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (HDScanner) WEIRDNESS IN AOP: advisor org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@32d4a8
| 2008-07-04 06:01:15,187 WARN [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (HDScanner) WEIRDNESS IN AOP: advisor org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@32d4a8
| 2008-07-04 06:01:15,207 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) Created KernelDeployment for: hskaEJB.jar
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) installing bean: persistence.units:ear=hska.ear,jar=hskaEJB.jar,unitName=hskaPersistence
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) with dependencies:
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) and demands:
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) jboss.jca:name=hskaDS,service=DataSourceBinding
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) and supplies:
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) persistence.units:unitName=hskaPersistence
| 2008-07-04 06:01:15,217 INFO [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) Added bean(persistence.units:ear=hska.ear,jar=hskaEJB.jar,unitName=hskaPersistence) to KernelDeployment of: hskaEJB.jar
| 2008-07-04 06:01:15,217 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Real: name=vfsfile:/C:/Programme/jboss/server/default/deploy/hska.ear/ state=PreReal mode=Manual requiredState=Real
| org.jboss.deployers.spi.DeploymentException: Error deploying hskaEJB.jar: <injection-target> could not be found: de.hska.bestellverwaltung.BestellverwaltungBean.hskaPersistence
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:192)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:95)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1023)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.RuntimeException: <injection-target> could not be found: de.hska.bestellverwaltung.BestellverwaltungBean.hskaPersistence
| at org.jboss.injection.InjectionUtil.findInjectionTarget(InjectionUtil.java:225)
| at org.jboss.injection.InjectionUtil.injectionTarget(InjectionUtil.java:301)
| at org.jboss.injection.PersistenceContextHandler.loadXml(PersistenceContextHandler.java:64)
| at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:561)
| at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:392)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:505)
| at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:185)
| ... 27 more
| 2008-07-04 06:01:15,217 WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] (HDScanner) Failed to process changes
| org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| vfsfile:/C:/Programme/jboss/server/default/deploy/hska.ear/ -> java.lang.RuntimeException: <injection-target> could not be found: de.hska.bestellverwaltung.BestellverwaltungBean.hskaPersistence
|
|
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:676)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:661)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:291)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
| at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162427#4162427
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162427
17 years, 9 months
[JBoss Tools (users)] - Launch Files: Real control of Seam-Gen
by luxspes
Hi!
Hi!
We (in my project) have heavily modified and enhanced the functionality of seam-gen, but I think we are hitting a hard limit: we can not say "do not generate the EntityEdit.xhtml" because that is read-only. No matter what we do, all the *.ftl templates get called for all the our entites.
We use JBossTools 2.1.1 and store our seam-gen configurations in Eclipse .launch files (and call them using the Code Generation Launcher).
The initial from database to entities configuration is in a file named:projectname-generate-entities.launch, after that I create a file named: projectname-generate-pages.launch that creates from the entities to the pages .
The difference is that projectname-generate-entities.launch only uses 1 exporter, the Domain code exporter (extract of projectname-generate-entities.launch):
| <booleanAttribute key="org.hibernate.tools.exporters.hbmtemplate0"
| value="true" />
| <stringAttribute
| key="org.hibernate.tools.exporters.hbmtemplate0.extension_id"
| value="org.hibernate.tools.hbm2java" />
| <mapAttribute
| key="org.hibernate.tools.exporters.hbmtemplate0.properties">
| <mapEntry key="template_path"
| value="\seam-templates\hibernate-tools" />
| </mapAttribute>
|
On the other hand projectname-generate-pages.launch is much larger (here is only the part that generates the EntityEdit.xhtml:
| <mapAttribute
| key="org.hibernate.tools.exporters.hbmtemplate4.properties">
| <mapEntry key="outputdir" value="/applicationName/WebContent/" />
| <mapEntry key="for_each" value="entity" />
| <mapEntry key="template_name" value="view/edit.xhtml.ftl" />
| <mapEntry key="file_pattern" value="{class-name}Edit.xhtml" />
| <mapEntry key="hibernatetool.util.toolclass"
| value="org.hibernate.eclipse.launch.SeamUtil" />
| </mapAttribute>
|
As you can see, the exporter configuration for EntityEdit.xhtml is very different, and one of themain differences is that it has a :
| <mapEntry key="for_each" value="entity" />
|
now, i would like to extend this mechanism to make it possible to generate the EntityEdit.xhtml only for... for example non-readonly entities (or any other criteria that I choose):
<mapEntry key="for_each" value="readonly-entity" />
|
(And then create my own custom @ReadOnlyEntity annotation to control generation)
My plan to achieve that effect was to create my own exporter, to do that, I need to configure a Generic Hibernate metamodel exporter and create my own exporter class (inheriting I think)... but here is my problem... the docs only explain how to set the exporter class for ant:
| <hbmtemplate
| filepattern="{package-name}/{class-name}.ftl"
| template="somename.ftl"
| exporterclass="Exporter classname"
| />
|
Docs do not explain how to configure the exporterclass in a eclipse *.launch file (or if is even possible)...
How can I do that? (Do I need to modify the Eclipse Jboss Tools code? or this features is available but undocumented?)
Thanks
Regards,
P.D. Sorry for cross posting, but I posted this question at SeamFramework.org and nobody answered, and I am starting to think that maybe that is because this forum is a better match for this kind of question because it is more related to JBoss Tools than Seam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162426#4162426
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162426
17 years, 9 months