cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAY-1170) cdbgen task fails due to NPE when instantiating TypesHandler
Date Wed, 11 Feb 2009 10:04:46 GMT

    [ https://issues.apache.org/cayenne/browse/CAY-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245#action_13245
] 

Andrus Adamchik commented on CAY-1170:
--------------------------------------

Here is more details on the issue which I can reproduce:

--- Nested Exception ---
java.lang.NullPointerException
	at org.apache.cayenne.dba.TypesHandler.<init>(TypesHandler.java:74)
	at org.apache.cayenne.dba.TypesHandler.getHandler(TypesHandler.java:58)
	at org.apache.cayenne.dba.JdbcAdapter.<init>(JdbcAdapter.java:100)
	at org.apache.cayenne.dba.mysql.MySQLAdapter.<init>(MySQLAdapter.java:75)
	at org.apache.cayenne.dba.mysql.MySQLSniffer.createAdapter(MySQLSniffer.java:71)
	at org.apache.cayenne.dba.DbAdapterFactoryChain.createAdapter(DbAdapterFactoryChain.java:58)
	at org.apache.cayenne.access.DbGeneratorPostprocessor.execute(DbGeneratorPostprocessor.java:48)
	at org.apache.cayenne.access.DbGenerator.runGenerator(DbGenerator.java:330)
	at org.apache.cayenne.tools.DbGeneratorTask.execute(DbGeneratorTask.java:91)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	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:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.Main.runBuild(Main.java:698)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Note that Dima's patch addresses a different problem of the inability to load the adapter
(which I am surprised nobody noticed before. Is everyone on Maven these days?)


/Users/andrus/work/test/build.xml:21: Can't load DbAdapter: org.apache.cayenne.dba.mysql.MySQLAdapter
	at org.apache.cayenne.tools.DbGeneratorTask.setAdapter(DbGeneratorTask.java:179)
	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:585)
	at org.apache.tools.ant.IntrospectionHelper$3.set(IntrospectionHelper.java:949)
	at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:400)
	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:392)
	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:349)
	at org.apache.tools.ant.Task.maybeConfigure(Task.java:202)
	at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:193)
	at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
	at org.apache.tools.ant.Task.perform(Task.java:347)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.Main.runBuild(Main.java:698)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
 



> cdbgen task fails due to NPE when instantiating TypesHandler
> ------------------------------------------------------------
>
>                 Key: CAY-1170
>                 URL: https://issues.apache.org/cayenne/browse/CAY-1170
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M5
>         Environment: RHEL 5 / Java 1.6.11
>            Reporter: Joshua Introne
>         Attachments: antGen.txt, antGen_1.txt, antGen_2.txt, build.xml
>
>
> Attempting to run cdbgen in 3.0M5 fails to load adapter if adapter is specified, or throws
an NPE if none is specified.  After some hair pulling, it looks like the newly rewritten method
JdbcAdapter.findResource isn't locating types.xml.  Haven't dug deeper, but problem doesn't
occur with 3.0M4. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message