EclipseLink & Seam - java.net.MalformedURLException
piotrjanik Mar 16, 2009 7:45 PMHi,
I've got a problem with running Seam app and EclipseLink together.
Here is stacktrace:
18:46:22,031 ERROR [[/admin]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener org.jboss.seam.InstantiationException: Could not instantiate Seam component: adminEntityManagerFactory at org.jboss.seam.Component.newInstance(Component.java:2106) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) at org.jboss.seam.init.Initialization.init(Initialization.java:735) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
and
Exception Description: An exception was thrown while processing persistence.xml from URL: vfsfile:/G:/DEVEL/AS/jboss-5.0.1.GA/server/default/deploy/sklepy.ear/ Internal Exception: java.net.MalformedURLException at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:121) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:135) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:67) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85) at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) 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.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) at org.jboss.seam.Component.callComponentMethod(Component.java:2219) at org.jboss.seam.Component.callCreateMethod(Component.java:2134) at org.jboss.seam.Component.newInstance(Component.java:2094) ... 64 more Caused by: Exception [EclipseLink-30004] (Eclipse Persistence Services - 1.1.0.r3639-SNAPSHOT): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while processing persistence.xml from URL: vfsfile:/G:/DEVEL/AS/jboss-5.0.1.GA/server/default/deploy/sklepy.ear/ Internal Exception: java.net.MalformedURLException at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:112) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:357) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:314) at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:237) at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:155) at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:144) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:107) ... 77 more Caused by: java.net.MalformedURLException at java.net.URL.<init>(URL.java:601) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
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="sklepyPU"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> <property name="eclipselink.target-database" value="HSQL"/> </properties> </persistence-unit> </persistence>
components.xml
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:drools="http://jboss.com/products/seam/drools" xmlns:mail="http://jboss.com/products/seam/mail" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:security="http://jboss.com/products/seam/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd"> <core:init debug="true" jndi-pattern="sklepy/#{ejbName}/local" /> <component name="org.jboss.seam.debug.hotDeployFilter"> <property name="urlPattern">*.seam</property> </component> <core:manager concurrent-request-timeout="500" conversation-id-parameter="cid" conversation-timeout="120000" parent-conversation-id-parameter="pid" /> <persistence:managed-persistence-context auto-create="true" entity-manager-factory="#{adminEntityManagerFactory}" name="entityManager" /> <persistence:entity-manager-factory name="adminEntityManagerFactory" persistence-unit-name="sklepyPU" /> <drools:rule-base name="securityRules"> <drools:rule-files> <value>/security.drl</value> </drools:rule-files> </drools:rule-base> <!-- security:rule-based-permission-resolver security-rules="#{securityRules}" /> <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true" /--> <event type="org.jboss.seam.security.notLoggedIn"> <action execute="#{redirect.captureCurrentView}" /> </event> <event type="org.jboss.seam.security.loginSuccessful"> <action execute="#{redirect.returnToCapturedView}" /> </event> <mail:mail-session host="localhost" password="test" port="2525" username="test" /> </components>
I'd be thankful, If You could help me.
Thanks!
P.