J2EE Tutorial problems: Bookstore1 & cloudscape
Hi!
I tried to do the bookstore1 example from the j2ee1.4 tutorial.
I successfully builed the Bookstore1 example...
Then I looked for the right target (cause the target names seem outdated in the tutorial) for the database creation...
I ran asant create-web-db (cause it is the target which uses books.sql ) but got a ClassNotFound Exc.
indicating that "COM/cloudscape/tools/ij" could be loaded. I searched for the cloudscape files but couldnt find them on my computer...Where can I download the cloudscape database and the drivers?
Cloudscape is now selled by IBM and there is no free version??
greetings,
flofighter
mistake: i meant "...indicating that "COM/cloudscape/tools/ij" couldn't be loaded...."
Similar Messages
-
Converter sample from J2EE Tutorial problem
Hello all,
I have built the ConvertApp using the J2EE as shown in the J2EE (which I highly recommend by the way --on-line or book version), but am getting the following error:
(from Verifier log file):
FAILED TESTS :
Test Name : tests.web.elements.WebEjbReferencesElement
Test Assertion : Web archive references to other beans homes test
Test Description : Error: Class [ ConverterHome ] not found in WEB-INF/classes or WEB-INF/lib.
For [ /ConverterWAR ]
Error: class [ ConverterHome ] cannot be found within this jar [ ConverterWAR ].
Error: Class [ Converter ] not found in WEB-INF/classes or WEB-INF/lib.
For [ /ConverterWAR ]
Error: class [ Converter ] cannot be found within this jar [ ConverterWAR ].
======
I'm running Windows 2K (I did see a similar problem someone was having under '98) and I know this tutorial works under W2K. I also have confirmed all my environmental variables are correct.
I am noticing that under the \j2eetutorial\examples\src\ejb\converter directory that I have a number of temp files (intermediate?). Specifically, if I use the Deploytool and select the ConverterApp in the tree view, I see three filenames that appear in the Contents window under the META-INF section:
app-client-ic.jar
ejb-jar-ic.jar
war-ic.war
Well, the temp files look like this (for example):
app-client-temp21282.jar
ejb_temp21276.jar
web_temp21293.war
I don't know if this means anything or not, as I seem to be getting the .ear, .war and .jar files when I deploy the ConverterApp without a problem.
If I try to run the Client from the \j2eetutorial\examples\src\ejb\converter directory using the runclient command, I get the following:
Application threw an exception:java.lang.NoClassDefFoundError: ConverterHome
The tutorial has a specific reference to this (p.43 in book) indicating a problem in the ConverterApp.jar file. I've undeployed, deleted ear, war, jar and temp files, and recompiled with ant (twice), thinking I must have skipped a step somewhere, but to no avail.
Both these problems look suspiciously like environment or path issues, but I cannot see anything obviously wrong. I confirmed that I do have a ConverterHome.class file in the C:\j2eetutorial\examples\build\ejb\converter directory too.
Has anyone seen this before who can share how to fix the issue?
Thanks for the help!
JonI have the same problem when trying to run 'Converter' example on Sun Deployment tool.
When I tried to use verifier for the ConverterApp I got the following message
"Error: Class [ ConverterHome ] not found in WEB-INF/classes or WEB-INF/lib.
For [ /ConverterWAR ]
Error: class [ ConverterHome ] cannot be found within this jar [ ConverterWAR ].
Error: Class [ Converter ] not found in WEB-INF/classes or WEB-INF/lib.
For [ /ConverterWAR ]
Error: class [ Converter ] cannot be found within this jar [ ConverterWAR ]."
When I tried to run the client app using the runclient command I got the
following message
"C:\j2eeDeployPractice\src\ejb\converter\runclient -client converter.ear -name converterClient -testauth
No application client desriptors defined for: converterClient"
Note: I was able to run the web client successfully when
using this URL: "http://localhost:8000/converter/index.jsp"
Any idea how to fix those error message is grealy appreciated.
KH -
Bookstore examplw-j2ee tutorial problem-plz help
Hi,
I have been working on the bookstore1 example servlets from the J2ee tutoril for quite a few days.
I followed the same procedure as given in the tutorials to deploy the application.
Wen i type
http://localhost:8080/bookstore1 on the browser,
I get the erropage.html and the .gif file listed.
But when i try to use
http://localhost:8080/bookstore1/bookstore it issues an error message
saying "The application is unavailable. Please try later."
I happened to see the same question posted by many,,,and the solution being,,the Pointbase server should be started in the background
I think my Pointbase server is running fine...But anyway i would be greatful if anyone cud reply in much detail about the configuration and working of the pointbase server.Or if my problem is due to some other cause,,please let me know.I jave all the properties set in the "asant listprops".
Please help
S&SPlease don't post duplicate questions.
Have you tried deploying the provided WAR?
<INSTALL>/examples/web/provided-wars/bookstore1.war
You should also look through the server.log file (either through the Admin Console or directly in the file) to look for the error. It should give you clues about what isn't working.
-Ian Evans -
J2ee tutorial problem with build.xml
When I am trying to compile the first exapmle "converter" I get following response: Property doesn�t support the "environment" attribute.
Does anyone have a clue what�s the problem???Maybe you are using an old version of Ant. Download Ant version 1.3 here:
http://jakarta.apache.org/builds/jakarta-ant/release/v1.3/bin/
regards
Jesper -
"asant build" for bookstore1 example in j2ee tutorial gives "compile error"
Hello everybody,
I am trying to run "asant build" command to build package for bookstore1 example given in j2ee tutorials.
I installed my j2ee tutorial 1.4 in "c:\java\j2eetutorial14" and my example is in "c:\java\j2eetutorial\examples\web\bookstore1".
My j2ee SDK with appliation server is installed in C:\sun\appserver.
When i run the "asant build" command in "c:\java\j2eetutorial\examples\web\bookstore1" directory i get compile error with last few lines as follows.
[javac] location: class servlets.ShowCartServlet
[javac] } catch (BookNotFoundException ex) {
[javac] ^
[javac] C:\Java\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCartServlet.jav
:136: cannot resolve symbol
[javac] symbol : class ShoppingCartItem
[javac] location: class servlets.ShowCartServlet
[javac] ShoppingCartItem item = (ShoppingCartItem) i.next();
[javac] ^
[javac] C:\Java\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCartServlet.jav
:136: cannot resolve symbol
[javac] symbol : class ShoppingCartItem
[javac] location: class servlets.ShowCartServlet
[javac] ShoppingCartItem item = (ShoppingCartItem) i.next();
[javac] ^
[javac] C:\Java\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCartServlet.jav
:137: cannot resolve symbol
[javac] symbol : class BookDetails
[javac] location: class servlets.ShowCartServlet
[javac] bd = (BookDetails) item.getItem();
[javac] ^
[javac] 69 errors
BUILD FAILED
file:C:/Java/j2eetutorial14/examples/web/bookstore1/build.xml:68: Compile failed; see the compiler error output for details.
Total time: 2 seconds
Can some one please help me.
thanksWhen i run the "asant build" command in
"c:\java\j2eetutorial\examples\web\bookstore1"
directory i get compile error with last few lines as
follows.Did you package the bookstore common files as described in Chapter 3? My guess is that you didn't include bookstore.jar from <INSTALL>/j2eetutorial14/examples/build/web/bookstore/dist/.
-Ian Evans
Sun Microsystems
J2EE Tutorial team -
J2ee Tutorial #4 problem - FailedLoginException
I am new to enterprise beans, and I am going through the j2ee tutorial. When working on lesson 4 - a simple message bean, I receive the following message after submitting the initail form:
javax.servlet.ServletException: Could not initialize due to javax.security.auth.login.FailedLoginException: Password Incorrect
at bonus.controllers.BonusCalculationServlet.init(BonusCalculationServlet.java:71)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
This appears to be a simple permissions problem, but I can not figure out where to configure these permissions. Can anyone help me?
TIA,
ChadEasy solution that I overlooked:
When setting the ResourceRefs for the BonusCalculationServlet, a user name and password must be specified. The generic username and password can be found in the auth.properties file in <install location>\config\auth.properties. In my specific case, they were the generic values from the j2ee install, guest/guest123.
-Chad -
Run client execution problem when running Sun J2EE tutorial example
Hi,
I'm trying to run the Sun J2EE tutorial example, CartApp.
When come to run the client application I got the following error:
The command:
E:\Dev\src\J2EE_J2EE_tutorial\examples\ears>runclient -client CarApp.ear -name CartClient -textauth
The error:
Application threw an exception:java.io.IOException: CarApp.ear does not exist
The deployment complete without error.
I tried to the the APPCPATH to :
set APPCPATH=E:\Dev\src\J2EE_J2EE_tutorial\examples\ears\CartAppClient.jar
set APPCPATH=CartAppClient.jar
On both set, it gave the same error above.
Did someone known the problem I have ?
Thnakshi ,
I think u have given other disply name to your J2EE client ,
Anyway check disply name of J2EE client through deploytool.
u have to use that display name to access the j2ee client .
suppose ur j2ee client displyname is testclient, u can use:
runclient -client ConverterApp.ear -name testclient
hope this will help u,
babu. -
J2EE tutorial (June 17 '04) servlet example compilation error
This is a copy of my previous post on the same topic, but this one has a more self-desriptive subject line. Apologies for duplication.
I am trying the first servlet example in the J2EE tutorial, June 17, 2004, pgs 443 - 448. I have completed all the steps as described. However, the URL results in the following error. I would like to point out that I am using the URL http://localhost:8081/bookstore1/bookstore (instead of port 8080 because the admin console suggests that port 8081 is an available http port):
Assistance would be appreciated.
HTTP Status 404 - /bookstore1/bookstore
type Status report
message /bookstore1/bookstore
description The requested resource (/bookstore1/bookstore) is not available.
Sun-Java-System/Application-Server-PE-8.0
I looked at the logviewer and there are 3 severe errors in the log:
1. Application Server
Log Entry Detail
Details
Timestamp: Aug 6, 2004 14:36:28.375
Log Level: SEVERE
Logger: javax.enterprise.system.container.web
Name-Value Pairs:
_ThreadID=12;
Record Number: 754
Message ID: WebModule[bookstore1]Exception sending context initialized event to listener instance of class listeners.ContextListener java.lang.NoClassDefFoundError
Complete Message
exception/OrderException
at listeners.ContextListener.contextInitialized(Unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3679)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4140)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:873)
at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:171)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:855)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:623)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:947)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:729)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:147)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:224)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:488)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:475)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:302)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:107)
at com.sun.enterprise.admin.server.core.mbean.config.ManagedServerInstance.multicastEvent(ManagedServerInstance.java:3880)
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:324)
at com.sun.enterprise.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:181)
at com.sun.enterprise.admin.server.core.mbean.config.AdminBase.invoke(AdminBase.java:86)
at com.sun.enterprise.admin.server.core.mbean.config.ConfigMBeanBase.invoke(ConfigMBeanBase.java:680)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:823)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:282)
at com.sun.enterprise.deployment.phasing.DeploymentService.multicastEvent(DeploymentService.java:341)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:284)
at com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.java:115)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:74)
at com.sun.enterprise.deployment.phasing.DeploymentService.executePhases(DeploymentService.java:233)
at com.sun.enterprise.deployment.phasing.DeploymentService.deploy(DeploymentService.java:150)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:275)
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:324)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:287)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:280)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:823)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:282)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:583)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:582)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
at java.lang.Thread.run(Thread.java:534)
2. Application Server
Log Entry Detail
Details
Timestamp: Aug 6, 2004 14:36:28.375
Log Level: SEVERE
Logger: tomcat.server./bookstore1.Context
Name-Value Pairs:
_ThreadID=12;
Record Number: 755
Message ID:
Complete Message
Error listenerStart
3. Application Server
Log Entry Detail
Details
Timestamp: Aug 6, 2004 14:36:28.375
Log Level: SEVERE
Logger: tomcat.server./bookstore1.Context
Name-Value Pairs:
_ThreadID=12;
Record Number: 756
Message ID:
Complete Message
Context startup failed due to previous errorsI had the same problem. It was caused by not including \j2eetutorial14\examples\web\bookstore\dist\bookstore.jar in the bookstore1.war. You may need to build the bookstore.jar file first if you haven�t already.
-
Cant run J2EE tutorial DukesBank ...
Hello,
I am new in Java and J2EE and want just run the J2EE tutorial DukesBank which i have downloaded from java.sun.com.
Therefore are following steps done:
1. starting the J2EE server (j2ee -start)
2. starting the cloudscape database (cloudscape -start)
3. starting deploytool
4. compile the sources (ant compile-ejb)
5. package the ejbs (ant package-ejb)
Now when i use the verifier in the deploytool then i got the error message:
FAILED: method [makePayment] does not throw valid application exception in Remote/Local interface [com.sun.ebank.ejb.tx.TxController]
I think this causes also the error message which i got when i goto localhost/bank in the webbrowser:
Server Error
Your request cannot be completed. The server got the following error
null
So now i have modified the interface TxController.java with deleting the method 'makePayment', also in TxControllerBean.java.
Then i compiled they again (ant compile-ejb and ant package-ejb) but I have the same problem again, so has the tutorial an error or do i need to modify something else ?!?
Many thanks for every help
Regards
Plato23DukesBank - RemoteException in AppClient package
The two ant invocations "ant compile-ejb" and "ant package-ejb" take care of of the EJBs. The simplest to way to bring Bank up is "ant all" and there is no need of Deploytool though you will need J2EE Server up.
The context root of the Bank is simply "bank" and the BankAdmin can be run using "runclient.bat" (with a few vanity changes).
This is as far as I go for running the Bank. But when I tried to activate the various functions in the BankAdmin, I kept getting "RemoteException" and could neither create accounts nor customers.
Can anybody out there help? Thanks
p (which does packages (Customer, c -
How to use ant1.3 in Wndows ME to build the examples in J2EE Tutorial?
When I tried to build the examples bundled with j2ee tutorial in the ..\j2eetutorial\examples directory using the ant 1.3 on Wndows ME I get the following exception.Anybody please help me.Is there any other build tool available for download?
StringIndexOutOfboundsException
D:\JAVATUTORIAL\J2EE\j2eetutorial\examples> ant -verbose all
Ant version 1.3 compiled on March 2 2001
Buildfile: build.xml
Detected Java Version: 1.3
Detected OS: Windows Me
parsing buildfile D:\JAVATUTORIAL\J2EE\j2eetutorial\examples\build.xml with URI
= file:D:/JAVATUTORIAL/J2EE/j2eetutorial/examples/build.xml
Project base dir set to: D:\JAVATUTORIAL\J2EE\j2eetutorial\examples
Build sequence for target `all' is [init, savingsaccount, bank, cart, checker, c
onfirmer, converter, enroller, order, salesrep, storagebin, teller, htmlreader,
warehouse, simplemessage, cmproster, ejb, date, hello1, hello2, bookstore1, web-
ejb, bookstore2, bookstore3, web, all]
Complete build sequence is [init, savingsaccount, bank, cart, checker, confirmer
, converter, enroller, order, salesrep, storagebin, teller, htmlreader, warehous
e, simplemessage, cmproster, ejb, date, hello1, hello2, bookstore1, web-ejb, boo
kstore2, bookstore3, web, all, create-storagebin-table, get-cci-jar, procs, cci,
connector, create-salesrep-table, create-procs-alias, create-coffee-table, abou
t, create-enroller-table, create-savingsaccount-table, create-web-db, create-war
ehouse-table, create-bank-table, clean, create-order-table, create-teller-table,
prepare, create-ejb-db]
init:
[property] Loading Environment myenv.
BUILD FAILED
D:\JAVATUTORIAL\J2EE\j2eetutorial\examples\build.xml:19: D:\JAVATUTORIAL\J2EE\j2
eetutorial\examples\build.xml:19: java.lang.StringIndexOutOfBoundsException: Str
ing index out of range: -1
--- Nested Exception ---
D:\JAVATUTORIAL\J2EE\j2eetutorial\examples\build.xml:19: java.lang.StringIndexOu
tOfBoundsException: String index out of range: -1
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1476)
at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:
248)
at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
at org.apache.tools.ant.Target.execute(Target.java:153)
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)
Total time: 2 seconds
D:\JAVATUTORIAL\J2EE\j2eetutorial\examples>
*********************************************************************Please Help Me
-
J2EE Tutorial: Exception when building with ant
I am trying to build the converter example on page 48 of the J2EE tutorial using ant. Ant seems to choke on the following line from the build.xml:
<property environment="myenv" />
The output of the "ant converter" command is:
Buildfile: build.xml
init:
BUILD FAILED
/usr/j2sdkee1.3/j2eetutorial/examples/src/build.xml:18: /usr/j2sdkee1.3/j2eetutorial/examples/src/build.xml:18: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
--- Nested Exception ---
/usr/j2sdkee1.3/j2eetutorial/examples/src/build.xml:18: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
--- Nested Exception ---
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1525)
at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:248)
at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
at org.apache.tools.ant.Target.execute(Target.java:153)
at org.apache.tools.ant.Project.runTarget(Project.java:898)
at org.apache.tools.ant.Project.executeTarget(Project.java:536)
at org.apache.tools.ant.Project.executeTargets(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)
Total time: 1 second
My best guess is that the "myenv" line in the build.xml requires some additional attribute. I'm using ant version 1.3. My OS is Solaris (noted for possible environment-related issues).
Thanks in advance!
Eric SmithOn Windows XP Pro, the line
<property environment="myenv" />
in the init target of build.xml for the j2ee tutorial examples triggers a windows error message:
16 bit MS-DOS Subsystem
=======================
C:\WINDOWS\system32\ntvdm.exe
Error while setting up environment for the application. Choose 'Close' to terminate the application.
<<Close>> <<Ignore>>
So it looks as if ant is trying and failing to access the winnt system environment here.
According to Ant Developers Handbook (Sams, October 2002, chapter 4, p. 151), the ant environment property "specifies a prefix, giving access to OS-specific environment variables. This is not supported on all platforms." Until this problem is fixed, it appears that on XP systems anyway, any ant settings in build.xml files that rely on direct access to the system environment will fail. Here is some debug output from the j2ee tutorial examples init target which demonstrates this:
C:\apps\j2sdkee1.3.1\j2eetutorial\examples>ant init
Buildfile: build.xml
init:
[echo] starting init target
[echo] reached marker 1
[echo] reached marker 2
[echo] value of J2EE_HOME is ${myenv.J2EE_HOME}
[echo] finished init target
BUILD SUCCESSFUL
where the task:
<property environment="myenv" />
(which generates the OS error popup noted above) occurs between marker 1 and marker 2. Clearly the value of J2EE_HOME is NOT being successfully read from the system environment here. -
J2EE Tutorial - Application Client
Hi,
I've been trying to work through the J2EE Tutorial and I've come to a complete standstill at the EJB section. I have a few problems.
First of all my deployment tool does not have a JNDI Names Tag as shown in the Mapping The Enterprize Beans Section (Chapter 19). How do I do this?
I am getting the following error when I try to run my J2EE Application Client.
Caught an unexpected exception!
java.lang.ClassCastException
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
emoteObject.java:229)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at ConverterClient.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:23
7)
at com.sun.enterprise.appclient.Main.<init>(Main.java:425)
at com.sun.enterprise.appclient.Main.main(Main.java:97)
Caused by: java.lang.ClassCastException
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableR
emoteObject.java:212)
Finally, can anybody recommend a good tutorial or book as I think the J2EE tutorial is unusually bad.http://docs.sun.com/source/819-0079/dgacc.html
Finally, can anybody recommend a good tutorial or
book as I think the J2EE tutorial is unusually bad.Search for Mastering EJB by Ed Roman. It should give a better understanding. -
Hello,
I am trying to use J2EE tutorial to learn about the technology. I am having trouble starting the Derby database. When I start Derby , I get the following message logged into db.log file
Server is ready to accept connections on port 1527.
Could not listen on port 1527 on host 0.0.0.0.
Because of this problem , I can not create or populate database.
The application Server seam to be started properly.
Can anybody help me with this problem?
Thanks.Have you tried to start Derby from the commandline using the instructions contained in the Derby documentation? It has worked for me.
-
Forte for Java J2EE Tutorial -- RMI RemoteException
In testing the J2EE tutorial (Restaurant_TestApp) I keep encountering the following error when invoking the findAll method. I get the same error when invoking Data.Restaurant create.
The error is:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException java.rmi.RemoteException
Any help or pointers from someone who has successfully built and tested the tutorial would be hugely appreciated!
Many thanks,
Luke
The full error from the J2EE log is:
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1560)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1472)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1289)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:403)
at Data.RestaurantEJB_PM_RemoteHomeImpl.findAll(RestaurantEJB_PM_RemoteHomeImpl.java:99)
at Data._RestaurantHome_Stub.findAll(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:232)
at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:97)
at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:190)
at org.apache.jsp.dispatch$jsp._jspService(dispatch$jsp.java:127)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)
java.rmi.RemoteException
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:389)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:431)
at Data.RestaurantEJB_PM_RemoteHomeImpl.findAll(RestaurantEJB_PM_RemoteHomeImpl.java:99)
at Data._RestaurantHome_Stub.findAll(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:232)
at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:97)
at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:190)
at org.apache.jsp.dispatch$jsp._jspService(dispatch$jsp.java:127)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)RMI is not that hard.. its just hard to explain :)
I have not done the tutorial.. so bare with me..
the errors your seeing can mean many things.. but above all else it means that you've got a problem either connecting or communicating to the rmi_server you created or the rmiRegistry
My suggestion is this...
First try a simpler application.
How about a simple server that returns a string
and sets a string.
then a client app that can read the server string and envoke a change to it...
This will show the basics involved.
let me know your toughts..
j. -
Error when executing EJB example in J2EE Tutorial
Hi,
I am trying Converter example in J2EE tutorial.
I have created ConverterJAR and ConverterWAR
ConverterJAR is verified sucessfully when using verifier option
When verifying ConverterWAR i am getting the following error
Error: Class [ converter.ConverterHome ] not found in WEB-INF/classes or WEB-INF/lib.
For [ /ConverterWAR ]
Error: class [ converter.ConverterHome ] cannot be found within this jar [ war-ic.war ].
Error: Class [ converter.Converter ] not found in WEB-INF/classes or WEB-INF/lib.
For [ /ConverterWAR ]
Error: class [ converter.Converter ] cannot be found within this jar [ war-ic.war ].
Please let me know if anybody aware of this problemI have created ConverterJAR and ConverterWAR
ConverterJAR is verified sucessfully when using
verifier option
When verifying ConverterWAR i am getting the
following errorCreate an EJB-client JAR which will contain only the home and remote interfaces. Place it in WEB-INF/lib of your webapp and recreate your WAR. This should solve the problem. :)
$
Maybe you are looking for
-
Get loggedin Session variables in Home Page
I got a members directory where u login. 1.How come they get killed when i refresh a page. 2.How do i get the loggedin session variable the home page. so i know if current user is logged in. The Application.cfc of the members is <cfcomponent name="Ap
-
ITunes Systematically Find Files
My computer got a bug and needed to be recovered. I had all the songs from iTunes saved, and in My Music Folder. iTunes continues to list all my songs, but cannot find the files. Is there anyway to have iTunes systematically find the songs (vs me cli
-
Material replication with LSMW and R3AC1
Hi experts. I'm using SRM 5.0 trying import the materiais from backend R3. I'm doing material replication using LSMW with batch-input of R3AC1, however after I mapping R3AC1 the transaction behaves diference way. Using other screens weren't mapping.
-
Hi, I am creating a java bean in a jsp file. I want to pass this bean to a java class in the same jsp file. eg: A1.jsp <jsp:useBean id="customer" class="com.Customer" scope="session"/> <jsp:setProperty name="customer" property="*"/> <% Teller teller=
-
How do I fix a permissions error to allow a program to download?
I went to download dropbox from the installer, package thing and when asked for my password for permission I accidently input the wrong password. I can't open the program at all. I kind of need this program as everyone uses it now, and it's a good cl