Skip to content

Instantly share code, notes, and snippets.

@xnrghzjh
Created November 18, 2011 23:53
Show Gist options
  • Save xnrghzjh/1378140 to your computer and use it in GitHub Desktop.
Save xnrghzjh/1378140 to your computer and use it in GitHub Desktop.
インタフェースとか継承とかでエラー
interface DBData {
def test()
}
abstract class AbstractDBData implements DBData {
def test(){}
}
class Sales extends AbstractDBData {
Boolean Delelte = false
def SalesNo
Date SalesDate
def Total
Set SalesDetail
String CreateUser
Date CreateDateTime
Date UpdateUser
Date UpdateDateTime
}
NetBeansで上の構成を作ってビルドした所下のようなエラーに
---
init:
Deleting: E:\MyLabo\LocalDBSample\build\built-jar.properties
deps-jar:
Updating property file: E:\MyLabo\LocalDBSample\build\built-jar.properties
Compiling 7 source files to E:\MyLabo\LocalDBSample\build\classes
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
E:\MyLabo\LocalDBSample\src\DBData\AbstractDBData.groovy: 14: unable to resolve class DBData
@ line 14, column 1.
abstract class AbstractDBData implements DBData {
1 error
E:\MyLabo\LocalDBSample\nbproject\build-impl.xml:629: The following error occurred while executing this line:
E:\MyLabo\LocalDBSample\nbproject\groovy-build.xml:23: Compilation Failed
構築失敗 (合計時間: 1 秒)
---
いろいろimportとか直したりしたのですがダメなので、試しにGroovyConsoleで全部つなげてみたら(Sample.groovy)OKとなったので、
下のAbstractDBData.groovyのようにしたらビルドが通りました。
interface DBData {
def test()
}
abstract class AbstractDBData implements DBData {
def test(){}
}
class Sales extends AbstractDBData {
Boolean Delelte = false
def SalesNo
Date SalesDate
def Total
Set SalesDetail
String CreateUser
Date CreateDateTime
Date UpdateUser
Date UpdateDateTime
}
DBData data = new Sales()
interface DBData {
def test()
}
abstract class AbstractDBData implements DBData {
def test(){}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment