I just used:
ant
ant deploy
and it gave me following error:
deploy:
[echo] localhost
[echo] 8080
[echo] order
[echo] C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\bp-project\ma
in.xml/../../../../../../bin/asadmin.bat
[echo] order
[echo] SQL92
[exec] Deprecated syntax, instead use:
[exec] asadmin --port 4848 --host localhost deploy [options] ...
[exec] com.sun.enterprise.admin.cli.CommandException: remote failure: Excep
tion while loading the app : javax.ejb.EJBException: javax.ejb.CreateException:
Initialization failed for Singleton ConfigBean
[exec]
[exec] Cannot create tables for application order. The expected DDL file or
der_order_createDDL.jdbc is not available.
[exec]
[exec]
[exec] Command deploy failed.
That means without making any changes. Then I included the following in the build.xml taken from roster example:
<target name="-pre-deploy" unless="netbeans.home" depends="init">
<antcall target="start-db"/>
</target>
But the problem remains the same. The server.log shows:
Caused by: javax.ejb.EJBTransactionRolledbackException
at com.sun.ejb.containers.BaseContainer.mapLocal3xException(BaseContainer.java:2253)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2053)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
at $Proxy264.createPart(Unknown Source)
at order.ejb.__EJB31_Generated__RequestBean__Intf____Bean__.createPart(Unknown Source)
at order.ejb.ConfigBean.createData(ConfigBean.java:36)
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.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006)
at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:109)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:133)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:115)
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.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:961)
at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:390)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:373)
at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:521)
... 38 more
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:4975)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4810)
at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(StatefulSessionContainer.java:1656)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2004)
... 62 more
Caused by: javax.ejb.EJBException: Object: order.entity.Part@63b596 is not a known entity type.
at order.ejb.RequestBean.createPart(RequestBean.java:53)
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 org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4087)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5272)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190)
... 60 more
To tell you the truth every example of the J2EE tutorials have some problems and can't be run smoothly. I can't run them as is and have to spent time figuring out what went wrong. Can anyone point out what went wrong?
Thanks.