• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RuntimeException when trying to deploy application using jboss

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam getting the following deployment error using jboss and EJB3 with eclipse IDE

00:53:35,546 INFO [ServerImpl] Starting JBoss (Microcontainer)...
00:53:35,562 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)
00:53:35,562 INFO [ServerImpl] Bootstrap URL: null
00:53:35,562 INFO [ServerImpl] Home Dir: C:\jjboss5.0.1\jboss-5.0.1.GA
00:53:35,562 INFO [ServerImpl] Home URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/
00:53:35,562 INFO [ServerImpl] Library URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/lib/
00:53:35,562 INFO [ServerImpl] Patch URL: null
00:53:35,562 INFO [ServerImpl] Common Base URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/common/
00:53:35,562 INFO [ServerImpl] Common Library URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/common/lib/
00:53:35,562 INFO [ServerImpl] Server Name: default
00:53:35,562 INFO [ServerImpl] Server Base Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server
00:53:35,562 INFO [ServerImpl] Server Base URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/
00:53:35,578 INFO [ServerImpl] Server Config URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/conf/
00:53:35,578 INFO [ServerImpl] Server Home Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default
00:53:35,578 INFO [ServerImpl] Server Home URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/
00:53:35,578 INFO [ServerImpl] Server Data Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default\data
00:53:35,578 INFO [ServerImpl] Server Library URL: file:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/lib/
00:53:35,578 INFO [ServerImpl] Server Log Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default\log
00:53:35,578 INFO [ServerImpl] Server Native Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default\tmp\native
00:53:35,578 INFO [ServerImpl] Server Temp Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default\tmp
00:53:35,578 INFO [ServerImpl] Server Temp Deploy Dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default\tmp\deploy
00:53:36,859 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/conf/bootstrap.xml
00:53:38,203 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
00:53:38,203 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
00:53:38,890 INFO [CopyMechanism] VFS temp dir: C:\jjboss5.0.1\jboss-5.0.1.GA\server\default\tmp
00:53:38,890 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
00:53:41,156 INFO [ServerInfo] Java version: 1.6.0_18,Sun Microsystems Inc.
00:53:41,156 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
00:53:41,156 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 16.0-b13,Sun Microsystems Inc.
00:53:41,156 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
00:53:41,250 INFO [JMXKernel] Legacy JMX core initialized
00:53:44,609 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@1906df(root=C:\jjboss5.0.1\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
00:53:44,609 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@1906df(root=C:\jjboss5.0.1\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
00:53:44,609 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl@69695f{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
00:53:47,281 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
00:53:59,187 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
00:53:59,187 INFO [NativeServerConfig] 3.0.5.GA
00:54:14,109 WARN [MappedReferenceMetaDataResolverDeployer] Unresolved references exist in JBossWebMetaData:[CustomerApplicationWeb.war#web-app:AnnotatedEJBReferenceMetaData{name=web.CustomerServlet/cust,ejb-ref-type=null,link=null,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=interface com.apress.ejb3.ch03.CustomerOrderManagerBeanLocal}]
00:54:14,640 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@5518176{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/AnuCalculatorEAR.ear/AnuCalculator.jar/}
00:54:14,640 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@5518176{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/AnuCalculatorEAR.ear/AnuCalculator.jar/}
00:54:14,640 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@5518176{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/AnuCalculatorEAR.ear/AnuCalculator.jar/}
00:54:14,640 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@5518176{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/AnuCalculatorEAR.ear/AnuCalculator.jar/}
00:54:14,671 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@16156579{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
00:54:14,671 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@16156579{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
00:54:14,671 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@16156579{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
00:54:14,671 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@16156579{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@33014755{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/CustomerApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@33014755{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/CustomerApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@33014755{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/CustomerApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@33014755{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/CustomerApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@22253751{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/ShoppingCartApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@22253751{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/ShoppingCartApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@22253751{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/ShoppingCartApplication.jar/}
00:54:14,703 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@22253751{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/ShoppingCartEAR.ear/ShoppingCartApplication.jar/}
00:54:20,406 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
00:54:20,750 INFO [MailService] Mail Service bound to java:/Mail
00:54:24,859 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
00:54:24,890 WARN [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
00:54:25,296 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
00:54:25,296 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
00:54:26,000 INFO [TransactionManagerService] Initializing recovery manager
00:54:26,656 INFO [TransactionManagerService] Recovery manager configured
00:54:26,656 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
00:54:28,078 INFO [TransactionManagerService] Starting transaction recovery manager
00:54:29,296 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
00:54:29,328 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
00:54:29,328 INFO [StandardService] Starting service jboss.web
00:54:29,328 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.2.GA
00:54:29,468 INFO [Catalina] Server startup in 344 ms
00:54:29,500 INFO [TomcatDeployment] deploy, ctxPath=/jbossws
00:54:30,734 INFO [TomcatDeployment] deploy, ctxPath=/web-console
00:54:31,406 INFO [TomcatDeployment] deploy, ctxPath=/invoker
00:54:31,968 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
00:54:32,093 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
00:54:32,156 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
00:54:32,218 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
00:54:32,281 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
00:54:32,500 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
00:54:32,562 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
00:54:32,578 INFO [RAMJobStore] RAMJobStore initialized.
00:54:32,578 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
00:54:32,578 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
00:54:32,578 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
00:54:35,406 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
00:54:36,453 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started
00:54:36,843 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
00:54:36,843 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1aaa02a started
00:54:36,890 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
00:54:36,890 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
00:54:36,890 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
00:54:36,890 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
00:54:36,906 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
00:54:36,906 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1518a15 started
00:54:36,906 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
00:54:36,906 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1eed1e1 started
00:54:37,187 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
00:54:37,234 INFO [TomcatDeployment] deploy, ctxPath=/
00:54:37,421 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
00:54:38,531 INFO [JBossASKernel] Created KernelDeployment for: AnuCalculator.jar
00:54:38,546 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=AnuCalculatorEAR.ear,jar=AnuCalculator.jar,name=CalcImpl,service=EJB3
00:54:38,546 INFO [JBossASKernel] with dependencies:
00:54:38,546 INFO [JBossASKernel] and demands:
00:54:38,546 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
00:54:38,546 INFO [JBossASKernel] and supplies:
00:54:38,546 INFO [JBossASKernel] jndi:AnuCalculatorEAR/CalcImpl/local-ejb.Calc
00:54:38,546 INFO [JBossASKernel] jndi:Firstcalc
00:54:38,546 INFO [JBossASKernel] jndi:AnuCalculatorEAR/CalcImpl/local
00:54:38,562 INFO [JBossASKernel] Class:ejb.Calc
00:54:38,578 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=AnuCalculatorEAR.ear,jar=AnuCalculator.jar,name=CalcImpl,service=EJB3) to KernelDeployment of: AnuCalculator.jar
00:54:38,796 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=AnuCalculatorEAR.ear,jar=AnuCalculator.jar,name=CalcImpl,service=EJB3
00:54:38,812 INFO [EJBContainer] STARTED EJB: ejb.CalcImpl ejbName: CalcImpl
00:54:38,968 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

AnuCalculatorEAR/CalcImpl/local - EJB3.x Default Local Business Interface
AnuCalculatorEAR/CalcImpl/local-ejb.Calc - EJB3.x Local Business Interface

00:54:39,375 INFO [TomcatDeployment] deploy, ctxPath=/AnuCalulatorWeb
00:54:39,718 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying CustomerEntityApplication.jar: <injection-target> could not be found: com.apress.ejb3.ch03.CustomerOrderManagerBean.Chapter03-Unit at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:201)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:103)
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:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: <injection-target> could not be found: com.apress.ejb3.ch03.CustomerOrderManagerBean.Chapter03-Unit
at org.jboss.injection.InjectionUtil.findInjectionTarget(InjectionUtil.java:223)
at org.jboss.injection.InjectionUtil.injectionTarget(InjectionUtil.java:299)
at org.jboss.injection.PersistenceContextHandler.loadXml(PersistenceContextHandler.java:64)
at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:588)
at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:415)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:523)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:194)
... 23 more

The jboss server does not start and it is stuck at this point, and i can see in the eclipse Error Log,
"Server JBoss v5.0 at localhost failed to start"

The session bean and local interfaces are,





and the client code calling the "CustomerOrderManagerLocal " is a servlet(CustomerServlet.java) as,



Please anybody help solve this error, i have been trying for the past 2 days to solve this error with no hope! .
Please point me in the right direction, if there is anything wrong with the above code.

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are using JBoss AS 5.0.1. I would recommend you use the latest 5.1.0 instead. If you still see this error after upgrading to the new version, then please post the new stacktrace.
 
Anuradha Prasanna
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Iam able to run it commenting out all the persistence related information in "CustomerOrderManagerBean.java" as it references 3 entity classes "Address.java" , "Customer.java" & "CustomerOrder.java"

With the modified ones as below,







i get the output as,
08:52:41,062 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 1m:23s:500ms
08:53:06,718 INFO [STDOUT] Creating IntialContext for CustomerApplication
08:53:06,718 INFO [STDOUT] Context initialized sucessfully: Proxy to jboss.j2ee:ear=CustomerEntityApplicationEAR.ear,jar=CustomerEntityApplication.jar,name=CustomerOrderManagerBean,service=EJB3 implementing [interface com.apress.ejb3.ch03.CustomerOrderManagerLocal, interface org.jboss.ejb3.proxy.intf.SessionProxy, interface org.jboss.ejb3.proxy.intf.EjbProxy]
08:53:06,921 INFO [STDOUT] Before PersistenceContext : In CustomerOrderManagerBean Constructor...
08:53:06,968 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
08:53:06,984 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
08:53:06,984 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.apress.ejb3.ch03.CustomerOrderManagerBean.insideCustomerOrderManagerBean()
08:53:07,000 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void com.apress.ejb3.ch03.CustomerOrderManagerBean.insideCustomerOrderManagerBean()
08:53:07,015 INFO [STDOUT] Inside Order Manager Bean...
08:53:07,031 INFO [STDOUT] If you see this line, every thing went successfully.


But if i uncomment the lines, line 1, line 2, line 3 , line 4 in the "CustomerOrderManagerBean.java" then i get a deployment error,(So the problem must be in the lines, line 3 and line 4)


jboss.j2ee:ear=CustomerEntityApplicationEAR.ear,jar=CustomerEntityApplication.jar,name=CustomerOrderManagerBean,service=EJB3
09:00:41,921 INFO [EJBContainer] STOPPED EJB: com.apress.ejb3.ch03.CustomerOrderManagerBean ejbName: CustomerOrderManagerBean
09:00:42,593 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2374221{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
09:00:42,593 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2374221{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
09:00:42,593 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2374221{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
09:00:42,593 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@2374221{vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/CustomerEntityApplication.jar/}
09:00:42,718 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying CustomerEntityApplication.jar: <injection-target> could not be found: com.apress.ejb3.ch03.CustomerOrderManagerBean.Chapter03-Unit
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:201)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:103)
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:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
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: com.apress.ejb3.ch03.CustomerOrderManagerBean.Chapter03-Unit
at org.jboss.injection.InjectionUtil.findInjectionTarget(InjectionUtil.java:223)
at org.jboss.injection.InjectionUtil.injectionTarget(InjectionUtil.java:299)
at org.jboss.injection.PersistenceContextHandler.loadXml(PersistenceContextHandler.java:64)
at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:588)
at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:415)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:523)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:194)
... 28 more
09:00:42,734 WARN [HDScanner] Failed to process changes
org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS IN ERROR:
Deployment "vfszip:/C:/jjboss5.0.1/jboss-5.0.1.GA/server/default/deploy/CustomerEntityApplicationEAR.ear/" is in error due to the following reason(s): java.lang.RuntimeException: <injection-target> could not be found: com.apress.ejb3.ch03.CustomerOrderManagerBean.Chapter03-Unit

at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:806)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
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)


I can only guess there is problem with my persistence.xml in the "\CustomerEntityApplication\ejbModule\META-INF" folder

persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="Chapter03-Unit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>java:/UpdaterDatasource transaction-type="RESOURCE_LOCAL"</non-jta-data-source>

<class>com.apress.ejb3.ch03.Address</class>
<class>com.apress.ejb3.ch03.Customer</class>
<class>com.apress.ejb3.ch03.CustomerOrder</class>

<properties>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost/events_calendar"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.password" value="anu"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>
</persistence>



is there any thing wrong with the persistence.xml?
as the problem is cleary in the lines, line 3 and line 4 about getting the "PersistenceContext" and "EntityManager".

Please help me fix this problem!...

 
Anuradha Prasanna
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please see the detailed error log,

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error instantiating servlet class web.CustomerServlet
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)


root cause

java.lang.RuntimeException: Unable to inject jndi dependency: env/web.CustomerServlet/cust into property web.CustomerServlet.cust: CustomerEntityApplicationEAR not bound

org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:82)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:380)
org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:259)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)


root cause

javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: CustomerEntityApplicationEAR not bound]

org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1348)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:813)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:380)
org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:259)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)


root cause

javax.naming.NameNotFoundException: CustomerEntityApplicationEAR not bound

org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
org.jnp.server.NamingServer.getObject(NamingServer.java:785)
org.jnp.server.NamingServer.lookup(NamingServer.java:396)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
javax.naming.InitialContext.lookup(InitialContext.java:392)
org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1342)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:813)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:380)
org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:259)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)


Please help me correct the "persistence.xml"...
What's the "javax.naming.NameNotFoundException:" exception?
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

@PersistenceContext(name = "Chapter03-Unit") //line 3
private EntityManager em; //line 4



This should be:



Notice, it's "unitName" and not "name". By the way, I will still recommend that you move to 5.1.0 which is the latest stable version.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic