Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Problem with EclipseLink in Tomcat 7 (with RAP bridge)(For a deployment on a Tomcat7-Server I had to pack the plugin into a WAR-file (using the plugin from the incubation update site). It starts well but as soon as the EntityManager is instanciated (meani)
Problem with EclipseLink in Tomcat 7 (with RAP bridge) [message #869018] Wed, 02 May 2012 21:25
Jan Brinkmann is currently offline Jan BrinkmannFriend
Messages: 5
Registered: May 2012
Junior Member
My application (Eclipse RAP 1.4 or 1.5, EclipseLink ORM, PostgreSQL) runs fine in my IDE or in a Eclipse OSGI server (just the binary without GUI). The second one only works if the application is unpacked (jar-Archive does not work).

For a deployment on a Tomcat7-Server I had to pack the plugin into a WAR-file (using the plugin from the incubation update site). It starts well but as soon as the EntityManager is instanciated (meaning the persistence.xml is accessed by EclipseLink), I get this error:
Quote:

Exception Description: An exception was thrown while trying to load persistence unit at url: bundleresource://1.fwk678808126:5
Internal Exception: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persisten ce.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: bundleresource://1.fwk678808126:5
Internal Exception: java.net.MalformedURLException
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(Persist enceUnitLoadingException.java:126)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:115)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at com.booking4.business.TestElementFactory.<init>(TestElementFactory.java:56)
at com.booking4.business.TestElementFactory.getInstance(TestElementFactory.java:38)
at com.booking4.util.session.AdminUserSession.login(AdminUserSession.java:28)
at com.booking4.gui.login.AdminLoginView.doDebugLogin(AdminLoginView.java:214)
at com.booking4.gui.login.AdminLoginView$1.mouseDoubleClick(AdminLoginView.java:61)
at org.eclipse.swt.events.MouseEvent.dispatchToObserver(MouseEvent.java:142)
at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:46)
at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:166)
at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.java:188)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1135)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2733)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2694)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2530)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:702)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:685)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
at com.booking4.BookingEntryPoint.createUI(BookingEntryPoint.java:15)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:177)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:289)
at java.lang.Thread.run(Thread.java:662)
at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:101)
Caused by: Exception [EclipseLink-30009] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.except ions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while trying to load persistence unit at url: bundleresource://1.fwk678808126:5
Internal Exception: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persisten ce.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: bundleresource://1.fwk678808126:5
Internal Exception: java.net.MalformedURLException
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionLoadingFromUrl(PersistenceUnitLoadingExc eption.java:99)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitPr ocessor.java:538)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcesso r.java:444)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.findPersistenceUnitInfoInArchive(JPAInitializer.java: 172)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.findPersistenceUnitInfoInArchives(JPAInitializer.java :154)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.findPersistenceUnitInfo(JPAInitializer.java:135)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:73)
... 25 more
Caused by: Exception [EclipseLink-30004] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.except ions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: bundleresource://1.fwk678808126:5
Internal Exception: java.net.MalformedURLException
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnit LoadingException.java:117)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProces sor.java:579)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitPr ocessor.java:536)
... 30 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 com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProces sor.java:577)
... 31 more

I tried to change parts of my XML but that doesnot seem to help. I debugged deeply into the EclipseLink library and the SAXParser parsing the config file and found that the MalformedURLException seems to be through because of a missing System-ID or encoding.

Is my general setup wrong? Maybe the Parser is not able to read from the jar-File in this context..
Any help is appreciated...

[Updated on: Wed, 02 May 2012 21:28]

Report message to a moderator

Previous Topic:ie8 memory problem
Next Topic:HttpServletRequest cannot be resolved to a type
Goto Forum:
  


Current Time: Fri Oct 22 04:53:30 GMT 2021

Powered by FUDForum. Page generated in 0.01800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top