Q:

JPA switching from "drop-and-create-table" to "none" results in massive Bugs

My team and me are currently working at a project using Hibernate-Validation and JPA.
Problem: we decided to use "drop-and-create-table" during the development-phase. everything worked just fine and as everything was implemented we changed the generation-mode to "none" (with a stable database running).
What it was doing before: We drop the table, create the table from our entities with specific attributes and fill the table with some datasets.
What it is doing now: We work on the existing, previously working, table (already filled with some data); but now some relations seem to be missing.
Now we have encountered a number of Exceptions during runtime and we can't locate them. It seems, that some attribute-relationships were deleted or something, because there are Exceptions (e.g. NullPointerExceptions) thrown, that were not thrown before.
Is there anything else we have to change in the persistence.xml, except the generation-mode?
here's the code for the persistance.xml:
    <?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.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_2_0.xsd">
    <persistence-unit name="ticketline" transaction-type="RESOURCE_LOCAL">

        <class>at.ticketline.entity.Veranstaltung</class>
        <class>at.ticketline.entity.Saal</class>
        <class>at.ticketline.entity.Reihe</class>
        <class>at.ticketline.entity.Platz</class>
        <class>at.ticketline.entity.Person</class>
        <class>at.ticketline.entity.Ort</class>
        <class>at.ticketline.entity.News</class>
        <class>at.ticketline.entity.Kunde</class>
        <class>at.ticketline.entity.Kuenstler</class>
        <class>at.ticketline.entity.Kategorie</class>
        <class>at.ticketline.entity.Bestellung</class>
        <class>at.ticketline.entity.BestellPosition</class>
        <class>at.ticketline.entity.BaseEntity</class>
        <class>at.ticketline.entity.Auffuehrung</class>
        <class>at.ticketline.entity.Artikel</class>
        <class>at.ticketline.entity.Adresse</class>
        <class>at.ticketline.entity.Benutzer</class>
        <class>at.ticketline.entity.Ticket</class>
        <class>at.ticketline.entity.compositekeys.PlatzPK</class>
        <class>at.ticketline.entity.compositekeys.ReihePK</class>
        <class>at.ticketline.entity.compositekeys.SaalPK</class>
        <class>at.ticketline.entity.compositekeys.AuffuehrungPK</class>

        <properties>
            <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
            <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:hsql://localhost/ticketline" />
            <property name="javax.persistence.jdbc.user" value="sa" />
            <property name="javax.persistence.jdbc.password" value="" />
            <property name="eclipselink.ddl-generation" value="none" />              
        </properties>
    </persistence-unit>
</persistence>

Stack-Trace:
!STACK 0
java.lang.NullPointerException
    at at.ticketline.kassa.ui.editor.TicketSuchergebnisEditor$11.getText(TicketSuchergebnisEditor.java:253)
    at org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnLabelProvider.java:36)
    at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
    at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:399)
    at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
    at org.eclipse.jface.viewers.AbstractTableViewer.createItem(AbstractTableViewer.java:277)
    at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:757)
    at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:649)
    at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:636)
    at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:592)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
    at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:590)
    at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
    at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
    at at.ticketline.kassa.ui.editor.TicketSuchergebnisEditor.createPartControl(TicketSuchergebnisEditor.java:67)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
    at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
    at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
    at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
    at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
    at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
    at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
    at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
    at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
    at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
    at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
    at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
    at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2756)
    at at.ticketline.kassa.ui.command.TicketSucheResultsCommandHandler.execute(TicketSucheResultsCommandHandler.java:28)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:178)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
    at at.ticketline.kassa.ui.view.TicketSucheView.openEditor(TicketSucheView.java:246)
    at at.ticketline.kassa.ui.view.TicketSucheView$1.widgetSelected(TicketSucheView.java:194)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at at.ticketline.kassa.TicketlineApplication.start(TicketlineApplication.java:21)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

A:

My guess is that your database is missing some data.
When you run your populate in memory, you are populating the shared cache and the database.  However you are most likely no building your objects correctly.
Maybe you have transient fields that you set in memory, but when you read from the database, these transient fields are null.
Maybe you have bi-directional relationships and are not setting both sides of the relationships, so are not populating the database correctly.
Maybe you have not mapped some attributes correctly, so the data in the database is not correct.
My guess is that if you disabled the shared cache, you would have the same errors.

