package p1;
import javax.ejb.Remote;
@Remote
public interface HelloUserBeanRemote {
public void sayHello(String name);
}
package p1;
import javax.ejb.Stateless;
@Stateless
public class HelloUserBeanBean implements HelloUserBeanRemote {
public void sayHello(String name)
{System.out.println("Hello"+name+"welcome to EJB 3.1");
}
}
import p1.*;
import javax.ejb.EJB;
public class Main {
@EJB
private HelloUserBeanRemote hellouser;
public void hello()
{
hellouser.sayHello("Mr. Pradeep");
}
public static void main(String[] args) {
Main a=new Main();
a.hello();
}
pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
init:
init:
deps-jar:
compile:
library-inclusion-in-manifest:
dist-ear:
deps-jar:
compile:
library-inclusion-in-manifest:
dist-ear:
init:
deps-jar:
compile:
library-inclusion-in-manifest:
dist-ear:
pre-pre-compile:
pre-compile:
do-compile:
post-compile:
compile:
pre-dist:
do-dist-without-manifest:
do-dist-with-manifest:
post-dist:
dist:
pre-run-deploy:
Incrementally deploying EJB_1_localhost:4848_server
Completed incremental distribution of EJB_1
post-run-deploy:
run-deploy:
run-display-browser:
run-ac:
Copying 1 file to E:\pradeep 25-8-8\java practice\NetBeans 6.1 programs\EJB_1\dist
28-Sep-2008 09:02:59 com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
com.sun.enterprise.InjectionException: Exception attempting to inject Resolved Ejb-Ref ejb_1.Main/hellouser@jndi: p1.HelloUserBeanRemote - > HelloUserBeanBean into class ejb_1.Main
at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:387)
at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:206)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:144)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:136)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:420)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: com.sun.enterprise.InjectionException: Injected field private p1.HelloUserBeanRemote ejb_1.Main.hellouser on Application Client class class ejb_1.Main must be declared static
at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:313)
... 6 more
Exception in thread "main" java.lang.RuntimeException: com.sun.enterprise.InjectionException: Exception attempting to inject Resolved Ejb-Ref ejb_1.Main/hellouser@jndi: p1.HelloUserBeanRemote - > HelloUserBeanBean into class ejb_1.Main
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:487)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: com.sun.enterprise.InjectionException: Exception attempting to inject Resolved Ejb-Ref ejb_1.Main/hellouser@jndi: p1.HelloUserBeanRemote - > HelloUserBeanBean into class ejb_1.Main
at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:387)
at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:206)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:144)
at com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:136)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:420)
... 2 more
Caused by: com.sun.enterprise.InjectionException: Injected field private p1.HelloUserBeanRemote ejb_1.Main.hellouser on Application Client class class ejb_1.Main must be declared static
at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:313)
... 6 more
Java Result: 1
run-EJB_1-app-client:
run:
BUILD SUCCESSFUL (total time: 27 seconds)
SCJP 5.0(75%), SCWCD 5.0(88%)
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
init:
init:
deps-jar:
compile:
library-inclusion-in-archive:
Building jar: E:\pradeep 25-8-8\java practice\NetBeans 6.1 programs\EJB_1\EJB_1-ejb\dist\EJB_1-ejb.jar
dist:
deps-jar:
compile:
library-inclusion-in-archive:
Copying 1 file to E:\pradeep 25-8-8\java practice\NetBeans 6.1 programs\EJB_1\EJB_1-app-client\build\jar\META-INF\lib
Building jar: E:\pradeep 25-8-8\java practice\NetBeans 6.1 programs\EJB_1\EJB_1-app-client\dist\EJB_1-app-client.jar
dist:
pre-run-deploy:
Redeploying E:\pradeep 25-8-8\java practice\NetBeans 6.1 programs\EJB_1\EJB_1-app-client\dist\EJB_1-app-client.jar
Start registering the project's server resources
Finished registering server resources
While redeploying, trying to stop the application in target server completed successfully
While redeploying, trying to remove reference for application in target server completed successfully
deployment started : 0%
deployment finished : 100%
Deploying application in domain completed successfully
Trying to create reference for application in target server completed successfully
Trying to start application in target server completed successfully
Deployment of application EJB_1-app-client completed successfully
All operations completed successfully
Enable of EJB_1-app-client in target server completed successfully
Enable of application in all targets completed successfully
All operations completed successfully
post-run-deploy:
run-deploy:
Copying 1 file to E:\pradeep 25-8-8\java practice\NetBeans 6.1 programs\EJB_1\EJB_1-app-client\dist
run-tool:
in main method
29-Sep-2008 13:01:44 com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
java.lang.NullPointerException
at ejb_1.Main.hello(Main.java:17)
at ejb_1.Main.main(Main.java:24)
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:597)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:461)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: java.lang.reflect.InvocationTargetException
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:597)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
... 2 more
Caused by: java.lang.NullPointerException
at ejb_1.Main.hello(Main.java:17)
at ejb_1.Main.main(Main.java:24)
... 8 more
Java Result: 1
run-jar:
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 16 seconds)
SCJP 5.0(75%), SCWCD 5.0(88%)
SCJP, SCJD, SCWCD, OCPJBCD
SCJP 5.0(75%), SCWCD 5.0(88%)
Caused by: java.lang.NullPointerException
at ejb_1.Main.hello(Main.java:17)
at ejb_1.Main.main(Main.java:24)
SCJP, SCJD, SCWCD, OCPJBCD
import p1.*;
import javax.ejb.EJB;
public class Main {
@EJB
private HelloUserBeanRemote hellouser;
public void hello()
{
hellouser.sayHello("Mr. Pradeep");
}
public static void main(String[] args) {
Main a=new Main();
a.hello();
}
SCJP 5.0(75%), SCWCD 5.0(88%)
SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
import p1.*;
import javax.ejb.EJB;
public class Main {
@EJB
static private HelloUserBeanRemote hellouser;
public void hello()
{
hellouser.sayHello("Mr. Pradeep");
}
public static void main(String[] args) {
Main a=new Main();
a.hello();
}
SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
SCJP 5.0(75%), SCWCD 5.0(88%)
SCJP 5.0(75%), SCWCD 5.0(88%)
SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
SCJP 5.0(75%), SCWCD 5.0(88%)
SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
A wop bop a lu bop a womp bam boom! Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|