String url = "">
if ((url != null && url.toLowerCase().startsWith("jdbc:"))) {
return true;
}
String dataSourceJndiName = (String) model.connectionDictionary().objectForKey(JDBCAdaptor.DataSourceJndiNameKey);
if(dataSourceJndiName != null) {
return true;
}
}
return false;
}
AdaptorName = JDBC
url = "" (JNDI should be used so in my Properties GlobalURL etc. is not set)
dataSourceJndiName = null !! (why?)
results in
protected void _buildDependenciesForModel(EOModel model, int migrateToVersion, Map<String, Integer> versions, Map<IERXMigration, ERXModelVersion> migrations) throws InstantiationException, IllegalAccessException {
if (!canMigrateModel(model)) {
return;
}
…
…
Migrator: you can’t make a Migration … and thats it …
Datasource is set in web.xml as I said before …
they said set JDBCAdaptor.DataSourceJndiNameKey in connectionDictionary …
I’ve done so …
index.eomodeled:
{
EOModelVersion = "2.1";
adaptorName = JDBC;
connectionDictionary = {
JDBCAdaptor.DataSourceJndiNameKey = "jdbc/test";
};
entities = ({className = "xxx.xxx.xxx.KeyValues"; name = KeyValues; });
}
Results in
The connection dictionaries for TestModel and erprototypes have the same URL and username, but at least one of them is a prototype model, so it shouldn't be a problem.
[28.03.14 CET] 0000005d webapp E com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally SRVE0266E: Beim Initialisieren von Servlets ist ein Fehler aufgetreten: {0}
javax.servlet.UnavailableException: Error initializing servlet adaptor: null
at com.webobjects.jspservlet.WOServletAdaptor._applicationInit(WOServletAdaptor.java:442)
at com.webobjects.jspservlet.WOServletAdaptor.initStatics(WOServletAdaptor.java:95)
at com.webobjects.jspservlet.WOServletAdaptor.init(WOServletAdaptor.java:652)
at er.extensions.jspservlet.ERXServletAdaptor.init(ERXServletAdaptor.java:66)
at javax.servlet.GenericServlet.init(GenericServlet.java:161)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1366)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:610)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:580)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
How can I set JDBCAdaptor.DataSourceJndiNameKey in my Properties?
Or better how can I fix the JNDI - Migration problem the right way?
Thank you for your help!
Matthias
Am 24.04.2014 um 15:18 schrieb David Avendasora <
email@hidden>:
On Apr 24, 2014, at 9:16 AM, David Avendasora <email@hidden> wrote:
Override the migrationsWillRun method and stick a breakpoint on it. Let’s make sure that it is getting that far.
Umm… in your subclass of ERXApplication, in case that wasn’t clear… It probably was to you, but hey, Future Dave is going to come here at some point, and *that* guy is pathetic.
Sir Dave
—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Nekesto, Inc.