Hi Wolfgang,
Thanks very much for your help here. I am now receiving a slightly different error due to a couple of small changes. Firstly I changed the data source names in web.xml and jboss-web.xml from java:musson to java:/musson (as shown below) - this is correct right? The second change was just adding some additional propertiey elements to the persistence.xml file. Speaking of the persistence.xml file, could you confirm when using Maven, this file should be placed under /projectname/src/main/resources/META-INF?
To answer your question, I only have the 'eclipselink-2.1.1.jar' under jbossjpa.war/WEB-INF/lib. The current configuration looks like this:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<resource-ref>
<res-ref-name>musson</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/jbossjpa</context-root>
<resource-ref>
<res-ref-name>musson</res-ref-name>
<jndi-name>java:/musson</jndi-name>
</resource-ref>
</jboss-web>
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="default" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>java:/musson</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.target-database" value="MySQL"/>
<property name="eclipselink.target-server" value="JBoss"/>
<property name="eclipselink.ddl-generation" value="update-tables"/>
<property name="eclipselink.weaving" value="false"/>
<property name="eclipselink.logging.level" value="FINEST"/>
</properties>
</persistence-unit>
</persistence>
The error stack messages I'm receiving now upon deployment is as follows:
16:01:16,100 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
16:01:16,243 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
16:01:16,262 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=musson' to JNDI name 'java:musson'
16:01:16,371 INFO [xnio] XNIO Version 2.1.0.CR2
16:01:16,377 INFO [nio] XNIO NIO Implementation Version 2.1.0.CR2
16:01:16,476 INFO [remoting] JBoss Remoting version 3.1.0.Beta2
16:01:16,536 INFO [TomcatDeployment] deploy, ctxPath=/
16:01:16,559 INFO [service] Removing bootstrap log handlers
16:01:16,614 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
16:01:16,615 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8009
16:01:16,616 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.Final "Neo"] Started in 11s:77ms
16:01:32,249 INFO [org.jboss.weld.Version] WELD-000900 1.1.0 (CR3)
16:01:32,277 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=jbossjpa.war#default
16:01:32,296 INFO [STDOUT] [EL Warning]: 2011-02-25 16:01:32.29--Thread(Thread[HDScanner,5,jboss])--The temporary classLoader for PersistenceLoadProcessor [default] is not available. Switching classLoader to [BaseClassLoader@47238cce{vfs:///java/apps/jbossas/jboss-6.0.0.Final/server/default/deploy/jbossjpa.war}]. Weaving has been disabled for this session. EclipseLink may be unable to get a spec mandated temporary class loader from the server, you may be able to use static weaving as an optional workaround.
16:01:32,300 INFO [STDOUT] [EL Finest]: 2011-02-25 16:01:32.296--ServerSession(93670476)--Thread(Thread[HDScanner,5,jboss])--Begin predeploying Persistence Unit default; session vfs:/java/apps/jbossas/jboss-6.0.0.Final/server/default/deploy/jbossjpa.war/WEB-INF/classes/_default; state Initial; factoryCount 0
16:01:32,300 INFO [STDOUT] [EL Finest]: 2011-02-25 16:01:32.3--ServerSession(93670476)--Thread(Thread[HDScanner,5,jboss])--property=eclipselink.orm.throw.exceptions; default value=true
16:01:32,300 INFO [STDOUT] [EL Finest]: 2011-02-25 16:01:32.3--ServerSession(93670476)--Thread(Thread[HDScanner,5,jboss])--property=eclipselink.jpa.uppercase-column-names; default value=false
16:01:32,302 INFO [STDOUT] [EL Finer]: 2011-02-25 16:01:32.301--ServerSession(93670476)--Thread(Thread[HDScanner,5,jboss])--Searching for default mapping file in vfs:/java/apps/jbossas/jboss-6.0.0.Final/server/default/deploy/jbossjpa.war/WEB-INF/classes/
16:01:32,304 INFO [STDOUT] [EL Finer]: 2011-02-25 16:01:32.304--ServerSession(93670476)--Thread(Thread[HDScanner,5,jboss])--Searching for default mapping file in vfs:/java/apps/jbossas/jboss-6.0.0.Final/server/default/deploy/jbossjpa.war/WEB-INF/classes/
16:01:32,305 INFO [STDOUT] [EL Finest]: 2011-02-25 16:01:32.305--ServerSession(93670476)--Thread(Thread[HDScanner,5,jboss])--End predeploying Persistence Unit default; session vfs:/java/apps/jbossas/jboss-6.0.0.Final/server/default/deploy/jbossjpa.war/WEB-INF/classes/_default; state Predeployed; factoryCount 1
16:01:32,671 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=jboss-switchboard:appName=jbossjpa,module=jbossjpa state=Create: javax.naming.CommunicationException [Root exception is java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl]
at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:604) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:542) [:5.0.5.Final]
at org.jboss.util.naming.Util.rebind(Util.java:131) [jboss-common-core.jar:2.2.17.GA]
at org.jboss.util.naming.Util.rebind(Util.java:117) [jboss-common-core.jar:2.2.17.GA]
at org.jboss.switchboard.mc.SwitchBoardImpl.bindInRelevantContext(SwitchBoardImpl.java:265) [:1.0.0-alpha-15]
at org.jboss.switchboard.mc.SwitchBoardImpl.start(SwitchBoardImpl.java:90) [:1.0.0-alpha-15]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_23]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_23]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_23]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_23]
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
.
.
.
.
Caused by: java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) [:1.6.0_23]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) [:1.6.0_23]
at java.rmi.MarshalledObject.<init>(MarshalledObject.java:101) [:1.6.0_23]
at org.jnp.interfaces.MarshalledValuePair.<init>(MarshalledValuePair.java:65) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.createMarshalledValuePair(NamingContext.java:1429) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:569) [:5.0.5.Final]
... 56 more
16:01:32,690 WARN [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss-injector:appName=jbossjpa,module=jbossjpa" is missing the following dependencies:
Dependency "<UNKNOWN jboss-injector:appName=jbossjpa,module=jbossjpa>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=jbossjpa,module=jbossjpa' **")
Deployment "jboss.web.deployment:war=/jbossjpa" is missing the following dependencies:
Dependency "jboss-injector:appName=jbossjpa,module=jbossjpa" (should be in state "Create", but is actually in state "Configured")
DEPLOYMENTS IN ERROR:
Deployment "jboss-switchboard:appName=jbossjpa,module=jbossjpa" is in error due to the following reason(s): java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl
Deployment "<UNKNOWN jboss-injector:appName=jbossjpa,module=jbossjpa>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-switchboard:appName=jbossjpa,module=jbossjpa' **
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]
.
.
.
.
Thanks for those links - I had come across the first one but the second link was new to me - this is where I got the additional property elements from! Thanks once again - hopefully speak again soon.
Andy