2012-03-31 8 views
0

thisコードを使用してJSF 2.0テーブルを作成します。JSF 2.0テーブルを作成できません

私は、NetBeansにコードをインポートするとき、私はこの問題を得る:

enter image description here enter image description here

私はこのコードを修正するにはどうすればよいですか?

お祈り申し上げます

P.S.これは、NetBeansからのエラー・スタックです:

Source roots: 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java 
Command line options: 
-d /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/target/classes -classpath /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/target/classes:/home/rcbandit/.m2/repository/javax/javaee-web-api/6.0/javaee-web-api-6.0.jar:/home/rcbandit/.m2/repository/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar:/home/rcbandit/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar:/home/rcbandit/.m2/repository/org/glassfish/osgi-cdi-api/3.1-b41/osgi-cdi-api-3.1-b41.jar: -sourcepath /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java: /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java -s /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/target/generated-sources/annotations -g -nowarn -target 1.7 -source 1.7 -encoding UTF-8 -endorseddirs /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/target/endorsed 
Compiling 1 source file to /home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/target/classes 
------------------------------------------------------------- 
COMPILATION ERROR : 
------------------------------------------------------------- 
com/DX_57/HM_57/Application.java:[52,24] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
com/DX_57/HM_57/Application.java:[60,17] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
com/DX_57/HM_57/Application.java:[61,17] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
com/DX_57/HM_57/Application.java:[62,17] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
com/DX_57/HM_57/Application.java:[68,65] error: cannot find symbol 
class Item 
com/DX_57/HM_57/Application.java:[68,12] error: cannot find symbol 
variable item of type Item 
com/DX_57/HM_57/Application.java:[70,15] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
com/DX_57/HM_57/Application.java:[80,15] error: constructor Item in class Item cannot be applied to given types; 
8 errors 
------------------------------------------------------------- 
------------------------------------------------------------------------ 
BUILD FAILURE 
------------------------------------------------------------------------ 
Total time: 3.939s 
Finished at: Sat Mar 31 17:29:51 EEST 2012 
Final Memory: 16M/162M 
------------------------------------------------------------------------ 
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project History-Module-57: Compilation failure: Compilation failure: 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[52,24] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[60,17] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[61,17] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[62,17] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[68,65] error: cannot find symbol 
class Item 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[68,12] error: cannot find symbol 
variable item of type Item 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[70,15] error: constructor Item in class Item cannot be applied to given types; 
actual and formal argument lists differ in length 
/home/rcbandit/Desktop/NetBeans/Prototype_13/History_Module_57/src/main/java/com/DX_57/HM_57/Application.java:[80,15] error: constructor Item in class Item cannot be applied to given types; 
-> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project History-Module-57: Compilation failure 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) 
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) 
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) 
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) 
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) 
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:601) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure 
    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656) 
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128) 
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) 
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 
    ... 19 more 


For more information about the errors and possible solutions, please read the following articles: 
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 

これは私がprivate Item item = new Item();

enter image description here

+0

申し訳ありませんが、私はほとんどスクリーンショットで何を読むことができません。エラーが発生しているコードだけを投稿し、エラーの内容を伝えてください。 –

+0

FFでは、右クリックして「画像の表示」をクリックしてください。あなたはコード –

+1

Erm、いいえ、申し訳ありませんが見つかりました。それはここで質問がどのように尋ねられるかではありません。 Netbeansはあなたの質問に** text **として含める必要があるコンパイラエラーを明確に述べています。 –

答えて

1

にカーソルを移動するときは、上に述べたように、独自のアイテム・クラスを実装する必要がNetbeandで問題のヒントですサイト:

Itemクラスは単なる単純なモデルオブジェクトであり、そのコードは十分に簡単です。二つの性質ロングidと文字列の値、デフォルトコンストラクタとの両方の性質を満たすコンストラクタとSerializableのJavaBeanの...

あなたが実際だからあなたを実装javax.mail.FetchProfile.Item

を使用していますサイトに記載されているシンプルなアイテムクラスは、それをインポートしても問題ありません。 それが助けてくれることを願っています!

関連する問題