Building the bookstore example in the JEE tutorial
Hi:
I am going through the SUN JEE tutorial with Netbeans 6.1 Beta
I am trying to define the DB connectivity.
After defining the JDBC resource as jdcb/BookDB with the Derby Pool in the glassfish app server
I run the bookstore1 project. This is supposed to populate the tables and run the application
I get the following error:
Null component com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/bookstore1,J2EEApplication=null,J2EEServer=server
WEB0123: WebModule [bookstore1] failed to deploy and has been disabled
java.lang.RuntimeException: java.lang.RuntimeException: Persistence unit named [book] is configured as JTA, yet only non-jta-data-source name is supplied in persistence.xml.
this is the persistence.xml supplied with the application:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="book" transaction-type="JTA">
<non-jta-data-source>jdbc/BookDB </non-jta-data-source>
</persistence-unit>
</persistence>Is there anything else that am I supposed to do?
Thanks for your time
Thanks for your reply:
I am new to persistence API and JEE
Could you please show me how to define this JTA data source?
Similar Messages
-
Can't compile the medrec tutorial
I can't build the medrec tutorial. Following the Tutorial 10: Exposing a Stateless
Session EJB as a Web Service, I execute the command "ant prepare build.split.dir".
But the medrecEar
can't be compiled correctly.
There are primarily two kinds of errors/warnings:
1)some classes, such as AdminSession can't be resolved;
2)EJB Local Reference doesn't have a JNDI name.
Who could help me. Thank you.When you compile through J2EE it should give no apache type errors. You must of included apache xml cocoon jar files in the CLASSPATH as well later put the j2ee.jar. However j2ee.jar has XML libraries, no need to include other thrid party xml libaries.
Other words its picking your thrid party xml jar files first and using that instead of your j2ee.jar xml libaries.
Cheers
Abraham Khalil -
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
-
Problems with Duke's Bookstore Examples (Chapter 3 of the J2EE 1.4 Tut)
Hi
Please help me, I am going through the J2EE tutorial (I have the Sun App Server 8 installed on a Win XP Service Pack 2 machine) but am running into problems.
I'm having a problem with the
1. asant build and
2. asant create-db_common
commands.
1. asant build
===========
When trying to use the command asant build I get the following problems:
D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>asant build
Buildfile: build.xml
D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\common\targets.xml could not be found
D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\web\common\targets.xml could not be found
init:
prepare:
build:
[javac] Compiling 11 source files to D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\booksto
re\build
BUILD FAILED
file:D:/P.Files%20Ext/MJ%20Ext/J2EE%201.4%20Tutorial%20EXT/j2eetutorial14/examples/web/bookstore/build.xml:54: D:\lib not found.
Total time: 8 seconds
I then created an empty folder = D:\lib
It then seemed to work?? but still could not find targets.xml as below
D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>asant build
Buildfile: build.xml
D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\common\targets.xml could not be found
D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\web\common\targets.xml could not be found
init:
prepare:
build:
[javac] Compiling 11 source files to D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore\build
BUILD SUCCESSFUL
Total time: 18 seconds
D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>
2. asant create-db_common
======================
When trying to use the command asant create-db_common I get the following problems (I had to create an empty folder - D:\pointbase\lib to get this far)
D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>asant create-db_common
Buildfile: build.xml
D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\common\targets.xml could not be found
D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\web\common\targets.xml could not be found
init:
create-db_common:
[java] java.lang.NoClassDefFoundError: com/pointbase/tools/toolsCommander
[java] Exception in thread "main"
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 8 seconds
D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>
Now I know that creating empty folders is not the solution so if anyone has any ideas as to what is wrong PLEASE tell me. I think there is something I need to add to a configuration file or something. I have re-installed the App Server but I still get the same problems. Thanks for your time!!Hi
I have the same problem with the hello2 example, in the tutorial... You didnt??
anyway maybe you are not setting the j2ee.home.
somebody named " Jennifer " give me this advise ( i told you this to recognice that i was helped before)
" Hello,
You are probably not setting j2ee.home correctly. Please go to the following page and read section Building The Examples. Pay special attention to the Note in that section.
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/About.html
thanks,
Jennifer "
good luck, see ya -
Problem populating the Pointbase DB (WSDP bookstore example)
Hi,
I'm trying to access a PointBase DB from a WebService, as suggested by Sun's tutorial on this topic (http://java.sun.com/webservices/docs/1.0/tutorial/doc/WebApp13.html#69868).
I have verified that the PB installation works fine on it's own (through the sample code in SampleDatabaseApplication.java), and also that the Tomcat servlet engine provided in the WSDP (WebService Developer Pack) is running OK.
But when I try to populate the DB (as described on the link above: ant create-book-db), nothing much happens (3 rows: "Buildfile: build.xml", "init:" & "create-book-db" are shown, and then it hangs).
I tried to get around this by manually executing the 'books.sql' statements in the PB console, and that works without problem. But when I try to deploy the bookstore example from the WSDP, ant hangs in the same way as mentioned above. The following is written to the (jwsdp_)log:
"Couldn't create bookstore database bean: Couldn't open connection to database: DbcpDataSourceFactory: driverClassName is required"
I checked all setting many times over (the driverClassName is specified in server.xml, so I can't pinpoint what's causing the log entry) and they all seem OK. Please help!
Cheers
/DanielHave you copied the PB client JAR to JWSDP_HOME/common/lib and restarted Tomcat?
-
Error While building the Sample Example
Hi,
I'm trying to run the first example in the following tutorial:
http://docs.oracle.com/cd/E17904_01/web.1111/e13758/toc.htm
Getting the following error:
java.lang.NoClassDefFoundError: com/sun/xml/ws/model/RuntimeModeler
at weblogic.wsee.util.ClassUtil.getNamespaceFromClass(ClassUtil.java:151
at weblogic.wsee.jws.WebServiceRuntimeDecl.initNamespaces(WebServiceRunt
imeDecl.java:253)
at weblogic.wsee.jws.WebServiceRuntimeDecl.<init>(WebServiceRuntimeDecl.
java:77)
at weblogic.wsee.tools.jws.decl.WebServiceDecl.<init>(WebServiceDecl.jav
a:48)
at weblogic.wsee.tools.jws.decl.WebServiceSEIDecl.<init>(WebServiceSEIDe
cl.java:81)
at weblogic.wsee.tools.jws.decl.WebServiceSEIDecl.<init>(WebServiceSEIDe
cl.java:68)
at weblogic.wsee.tools.jws.decl.WebServiceDeclFactory.newInstance(WebSer
viceDeclFactory.java:54)
at weblogic.wsee.tools.anttasks.JwsModule.buildAndValidate(JwsModule.jav
a:583)
at weblogic.wsee.tools.anttasks.JwsModule.loadWebServices(JwsModule.java
*:574)*
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:369)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:256)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:184)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.model.RuntimeModeler
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
*... 29 more*
Kindly help me out in how to run the example, please let me know where I'm going wrong.
I'm beginning to feel oracle has the most pathetic documentation, even when u following exactly as told in the tutorial, still its code does not work, personally I feel oracle products are the most complex and most useless while at the same time very expensive.Hi,
you see that message: "The password must be at least 8 alphanumeric characters with at least one number or special character." ?
The password: The weblogic password you provide when prompted
must be at least: minimal condition for secure passwords enforced on WLS by default
at least 8 alphanumeric characters: no 7 but eight or more characters
with at least one number or special character: password should have a number in it or an "@" "-" or similar
E.g.
weblogic1
is one password option that would meet that requirement
Frank -
Asant problem- building the hello1 example
I am trying to run the first example from the tutorial.I followed the instructions as described in the tutorial and configured the environment variables. However, when I am trying to build the hello1 example I get the following message:
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertionsWhat am I doing wrong?
Thank you,
ItayThanks for your quick reply.
My environment variables are:
J2EE_HOME = E:\Java\J2EE\AppServer
JAVA_HOME = %J2EE_HOME%\jdk
So as you can see I have no spaces in the directories names. -
Bookstore example in Servlets chap..trouble going thro the following steps
hi
i successfully connected to the Pointbase database and was able to view the table created.
Now this is with reference to Chapter 11 on Servlet technology. I went through the following steps and i am stuck in Step 9, after which i do not understand the correlation between what is said in Step 10 and what is there while using the deploy tool..
The following are the steps which i have copied and pasted from the J2Ee tutorial Chap 11 - Section on "Example Servlets"
Add the filters filters.HitCounterFilter and filters.OrderFilter (described in Filtering Requests and Responses).
1)Select the Filter Mapping tab.
2)Click Edit Filter List.
3)Click Add Filter.
4)Select filters.HitCounterFilter from the Filter Class column. deploytool will automatically enter HitCounterFilter in the Display Name column.
5)Click Add.
6)Select filters.OrderFilter from the Filter Class column. deploytool will automatically enter OrderFilter in the Display Name column.
7)Click OK.
8)Click Add.
9)Select HitCounterFilter from the Filter Name column.
10)Select Servlet from the Target Type column.
11)Select BookStoreServlet from the Target column.
12)Repeat for OrderFilter. The target type is Servlet and the target is ReceiptServlet.
Step 10 is what baffles me. I cannot see a Target Type column in the dialog box.Perhaps I am not being very careful in following the steps.
can anybody help me out with step 10 and above
Please help me out
thanks in advancei was a bit confused about the following:
when trying to running the bookstore1 application the
tutorial says one has got to go back and "Perform all
the operations described in Accessing Databases from
Web Applications"This instruction is telling you to do the operation as described in Chapter 3. So, you run create-db_common in the bookstore directory because the database tables are shared by all the bookstore applications.
>
this takes me to Chapter 3, where we have the section
"Accessing Databases from Web Applications".
Now the steps there are as follows:
1) Populating the example database:
In a terminal window, go to
<INSTALL>/j2eetutorial14/examples/web/bookstore/.
Run asant create-db_common. This task runs a PointBase
commander tool command to read the file books.sql and
execute the SQL commands contained in the file. The
table named books is created for the user pbpublic in
the sun-appserv-samples PointBase database.
and so on..
now with regard to Bookstore1 do i have to do the
following ( i mean is that is implied by the
tutorial)?
In a terminal window, go to
<INSTALL>/j2eetutorial14/examples/web/bookstore1/
( instead of bookstore i substituted bookstore1)
is that right or am i wrong?
No, you only run create-db_common in the bookstore directory. The X-ref is there in case you didn't create the tables while working through Chapter 3. -
I am trying to run the Authentication Security provider example (http://dev2dev.bea.com/codelibrary/code/sec_rdbms.jsp)
in a WLS 8.1 environment. Followed the steps listed in the readme file to get
this installed. After creating the domain and building the example using ant,
when I try to restart the WLS, I get a:
<Nov 24, 2003 10:31:19 AM CST> <Info> <WebLogicServer> <BEA-000377> <Starting
We
bLogic Server with Java HotSpot(TM) Client VM Version 1.4.1_03-b02 from Sun Micr
osystems Inc.>
<Nov 24, 2003 10:31:19 AM CST> <Info> <Configuration Management> <BEA-150016>
<T
his server is being started as the administration server.>
<Nov 24, 2003 10:31:19 AM CST> <Info> <Management> <BEA-141107> <Version: WebLog
ic Server 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009
WebLogic XMLX Module 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009>
<Nov 24, 2003 10:31:19 AM CST> <Notice> <Management> <BEA-140005> <Loading domai
n configuration from configuration repository at C:\bea\user_projects\domains\au
thrdbms\.\config.xml.>
<Nov 24, 2003 10:31:21 AM CST> <Notice> <Log Management> <BEA-170019> <The serve
r log file C:\bea\user_projects\domains\authrdbms\myserver\myserver.log is opene
d. All server side log events will be written to this file.>
<Nov 24, 2003 10:31:23 AM CST> <Critical> <WebLogicServer> <BEA-000364> <Server
failed during initialization. Exception:javax.management.RuntimeOperationsExcept
ion: RuntimeException thrown by the invoke method of the Dynamic MBean
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getAuthenticationProviders(Unknown Source)
at weblogic.security.internal.RealmValidatorImpl.checkAuthenticationProv
iders(RealmValidatorImpl.java:69)
at weblogic.security.internal.RealmValidatorImpl.validate(RealmValidator
Impl.java:54)
at weblogic.management.security.RealmImpl.validate(RealmImpl.java:37)
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 javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMB
ean.java:1304)
at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java
:464)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
Caused by: javax.management.MBeanException
at weblogic.management.commo.CommoProxySupporter.invokeI(CommoProxySuppo
rter.java:220)
at weblogic.management.commo.CommoProxySupporter.getMBeanDescriptorValue
(CommoProxySupporter.java:158)
at weblogic.management.commo.CommoProxy.getInterfaceClass(CommoProxy.jav
a:436)
at weblogic.management.commo.CommoProxy.createFreshProxy(CommoProxy.java
:475)
at weblogic.management.commo.CommoProxy.getProxyInstance(CommoProxy.java
:385)
at weblogic.management.commo.CommoProxy.getCommoProxy(CommoProxy.java:12
6)
at weblogic.management.commo.CommoProxy.wrap(CommoProxy.java:499)
at weblogic.management.commo.CommoProxy.wrap(CommoProxy.java:509)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:215)
... 24 more
--------------- nested within: ------------------
javax.management.RuntimeMBeanException: RuntimeException thrown in managed resou
rce while trying to invoke operation validate
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMB
ean.java:1352)
at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java
:464)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
--------------- nested within: ------------------
javax.management.RuntimeOperationsException: RuntimeException thrown by the invo
ke method of the Dynamic MBean
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
59)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
>
<Nov 24, 2003 10:31:23 AM CST> <Emergency> <WebLogicServer> <BEA-000342> <Unable
to initialize the server: javax.management.RuntimeOperationsException: RuntimeE
xception thrown by the invoke method of the Dynamic MBean>
The WebLogic Server did not start up properly.
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getAuthenticationProviders(Unknown Source)
at weblogic.security.internal.RealmValidatorImpl.checkAuthenticationProv
iders(RealmValidatorImpl.java:69)
at weblogic.security.internal.RealmValidatorImpl.validate(RealmValidator
Impl.java:54)
at weblogic.management.security.RealmImpl.validate(RealmImpl.java:37)
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 javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMB
ean.java:1304)
at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java
:464)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
Caused by: javax.management.MBeanException
at weblogic.management.commo.CommoProxySupporter.invokeI(CommoProxySuppo
rter.java:220)
at weblogic.management.commo.CommoProxySupporter.getMBeanDescriptorValue
(CommoProxySupporter.java:158)
at weblogic.management.commo.CommoProxy.getInterfaceClass(CommoProxy.jav
a:436)
at weblogic.management.commo.CommoProxy.createFreshProxy(CommoProxy.java
:475)
at weblogic.management.commo.CommoProxy.getProxyInstance(CommoProxy.java
:385)
at weblogic.management.commo.CommoProxy.getCommoProxy(CommoProxy.java:12
6)
at weblogic.management.commo.CommoProxy.wrap(CommoProxy.java:499)
at weblogic.management.commo.CommoProxy.wrap(CommoProxy.java:509)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:215)
... 24 more
--------------- nested within: ------------------
javax.management.RuntimeMBeanException: RuntimeException thrown in managed resou
rce while trying to invoke operation validate
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMB
ean.java:1352)
at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java
:464)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
--------------- nested within: ------------------
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getAuthenticationProviders(Unknown Source)
at weblogic.security.internal.RealmValidatorImpl.checkAuthenticationProv
iders(RealmValidatorImpl.java:69)
at weblogic.security.internal.RealmValidatorImpl.validate(RealmValidator
Impl.java:54)
at weblogic.management.security.RealmImpl.validate(RealmImpl.java:37)
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 javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMB
ean.java:1304)
at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java
:464)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
Caused by: javax.management.MBeanException
at weblogic.management.commo.CommoProxySupporter.invokeI(CommoProxySuppo
rter.java:220)
at weblogic.management.commo.CommoProxySupporter.getMBeanDescriptorValue
(CommoProxySupporter.java:158)
at weblogic.management.commo.CommoProxy.getInterfaceClass(CommoProxy.jav
a:436)
at weblogic.management.commo.CommoProxy.createFreshProxy(CommoProxy.java
:475)
at weblogic.management.commo.CommoProxy.getProxyInstance(CommoProxy.java
:385)
at weblogic.management.commo.CommoProxy.getCommoProxy(CommoProxy.java:12
6)
at weblogic.management.commo.CommoProxy.wrap(CommoProxy.java:499)
at weblogic.management.commo.CommoProxy.wrap(CommoProxy.java:509)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:215)
... 24 more
--------------- nested within: ------------------
javax.management.RuntimeMBeanException: RuntimeException thrown in managed resou
rce while trying to invoke operation validate
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMB
ean.java:1352)
at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java
:464)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
--------------- nested within: ------------------
javax.management.RuntimeOperationsException: RuntimeException thrown by the invo
ke method of the Dynamic MBean
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
59)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBean
ServerImpl.java:765)
at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:284)
at $Proxy0.validate(Unknown Source)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealm(SecurityServiceManagerDelegateImpl.java:376)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.loadReal
m(SecurityServiceManagerDelegateImpl.java:697)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
zeRealms(SecurityServiceManagerDelegateImpl.java:730)
at weblogic.security.service.SecurityServiceManagerDelegateImpl.initiali
ze(SecurityServiceManagerDelegateImpl.java:873)
at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
erviceManager.java:719)
at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:820)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:664)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:342)
at weblogic.Server.main(Server.java:32)
Reason: javax.management.RuntimeOperationsException: RuntimeException thrown by
the invoke method of the Dynamic MBean
Been strugling with this over the weekend. Can anyone help? thanks, Swetal"Swetal Vaidya" <[email protected]> wrote in message
news:[email protected]...
>
I am trying to run the Authentication Security provider example(http://dev2dev.bea.com/codelibrary/code/sec_rdbms.jsp)
in a WLS 8.1 environment. Followed the steps listed in the readme file toget
this installed. After creating the domain and building the example usingant,
when I try to restart the WLS, I get a:
<Nov 24, 2003 10:31:19 AM CST> <Info> <WebLogicServer> <BEA-000377><Starting
We
bLogic Server with Java HotSpot(TM) Client VM Version 1.4.1_03-b02 fromSun Micr
osystems Inc.>
<Nov 24, 2003 10:31:19 AM CST> <Info> <Configuration Management><BEA-150016>
<T
his server is being started as the administration server.>
<Nov 24, 2003 10:31:19 AM CST> <Info> <Management> <BEA-141107> <Version:WebLog
ic Server 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009
WebLogic XMLX Module 8.1 SP1 Fri Jun 20 23:06:40 PDT 2003 271009>
<Nov 24, 2003 10:31:19 AM CST> <Notice> <Management> <BEA-140005> <Loadingdomai
n configuration from configuration repository atC:\bea\user_projects\domains\au
thrdbms\.\config.xml.>
<Nov 24, 2003 10:31:21 AM CST> <Notice> <Log Management> <BEA-170019> <Theserve
r log file C:\bea\user_projects\domains\authrdbms\myserver\myserver.log isopene
d. All server side log events will be written to this file.>
<Nov 24, 2003 10:31:23 AM CST> <Critical> <WebLogicServer> <BEA-000364><Server
failed during initialization.Exception:javax.management.RuntimeOperationsExcept
ion: RuntimeException thrown by the invoke method of the Dynamic MBean
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getAuthenticationProviders(Unknown Source)
atweblogic.security.internal.RealmValidatorImpl.checkAuthenticationProv
iders(RealmValidatorImpl.java:69)
atweblogic.security.internal.RealmValidatorImpl.validate(RealmValidator
Impl.java:54)
atweblogic.management.security.RealmImpl.validate(RealmImpl.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)It looks like some sort of exception is being thrown when getting the
authentication
providers. I would check the config.xml for the authentication providers
definitions.
See if you see anything that doesn't look right. -
Can not build the client example of the webservices/rpc-example
Hi!
I have some problems with building the client example of the webservices rpc example.
I followed the instructions of the readme and was able to build the weatherejb,
after I saved the client.jar in %WL_HOME%\samples\examples\webservices\rpc\javaClient
I put the cleint.jar into the classpath of the setExamplesEnv.cmd:
set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\lib\weblogic.jar;%WL_HOME%\lib\xmlx.jar;%WL_HOME%\samples\eval\cloudscape\lib\cloudscape.jar;%WL_HOME%\samples\examples\webservices\rpc\javaClient\client.jar;%CLIENT_CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%;C:\bea
but if I now change to
$ cd %WL_HOME%\samples\examples\webservices\rpc\javaClient
and try to build the ear -files by typing:
ant
I get the message:
C:\bea\samples\examples\webservices\rpc\javaClient>ant
Buildfile: build.xml
compile:
[javac] Compiling 3 source files to C:\bea\config\examples\clientclasses
[javac] C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:8:
ca
nnot resolve symbol
[javac] symbol : class Weather
[javac] location: package weatherEJB
[javac] import examples.webservices.rpc.weatherEJB.Weather;
[javac] ^
[javac] C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:28:
c
annot resolve symbol
[javac] symbol : class Weather
[javac] location: class examples.webservices.rpc.javaClient.Client
[javac] Weather.class.getName() );
[javac] ^
[javac] C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:34:
c
annot resolve symbol
[javac] symbol : class Weather
[javac] location: class examples.webservices.rpc.javaClient.Client
[javac] Weather service = (Weather)context.lookup("http://localhost:7001
/weather/statelessSession.WeatherHome/statelessSession.WeatherHome.wsdl");
[javac] ^
[javac] C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:34:
c
annot resolve symbol
[javac] symbol : class Weather
[javac] location: class examples.webservices.rpc.javaClient.Client
[javac] Weather service = (Weather)context.lookup("http://localhost:7001
/weather/statelessSession.WeatherHome/statelessSession.WeatherHome.wsdl");
[javac] ^
[javac] 4 errors
BUILD FAILED
C:\bea\samples\examples\webservices\rpc\javaClient\build.xml:13: Compile failed,
messages should have been provided.
Total time: 3 seconds
thanxWell, Remember(you might have done this) u have to run the
setExamplesEnv.cmd after u add the client.jar in the classpath. Also, the
ant command will work only in the window where u ran the setExamplesEnv.cmd.
Thats what i didnt and it works perfect for me.
Hope this helps u.
Regards
Elangovan
Naz wrote in message <[email protected]>...
>
Hi!
I have some problems with building the client example of the webservicesrpc example.
I followed the instructions of the readme and was able to build theweatherejb,
after I saved the client.jar in%WL_HOME%\samples\examples\webservices\rpc\javaClient
I put the cleint.jar into the classpath of the setExamplesEnv.cmd:
setCLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\
lib\weblogic.jar;%WL_HOME%\lib\xmlx.jar;%WL_HOME%\samples\eval\cloudscape\li
b\cloudscape.jar;%WL_HOME%\samples\examples\webservices\rpc\javaClient\clien
t.jar;%CLIENT_CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%;C:\bea
>
but if I now change to
$ cd %WL_HOME%\samples\examples\webservices\rpc\javaClient
and try to build the ear -files by typing:
ant
I get the message:
C:\bea\samples\examples\webservices\rpc\javaClient>ant
Buildfile: build.xml
compile:
[javac] Compiling 3 source files toC:\bea\config\examples\clientclasses
[javac]C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:8:
ca
nnot resolve symbol
[javac] symbol : class Weather
[javac] location: package weatherEJB
[javac] import examples.webservices.rpc.weatherEJB.Weather;
[javac] ^
[javac]C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:28:
c
annot resolve symbol
[javac] symbol : class Weather
[javac] location: class examples.webservices.rpc.javaClient.Client
[javac] Weather.class.getName() );
[javac] ^
[javac]C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:34:
c
annot resolve symbol
[javac] symbol : class Weather
[javac] location: class examples.webservices.rpc.javaClient.Client
[javac] Weather service =(Weather)context.lookup("http://localhost:7001
/weather/statelessSession.WeatherHome/statelessSession.WeatherHome.wsdl");
[javac] ^
[javac]C:\bea\samples\examples\webservices\rpc\javaClient\Client.java:34:
c
annot resolve symbol
[javac] symbol : class Weather
[javac] location: class examples.webservices.rpc.javaClient.Client
[javac] Weather service =(Weather)context.lookup("http://localhost:7001
/weather/statelessSession.WeatherHome/statelessSession.WeatherHome.wsdl");
[javac] ^
[javac] 4 errors
BUILD FAILED
C:\bea\samples\examples\webservices\rpc\javaClient\build.xml:13: Compilefailed,
messages should have been provided.
Total time: 3 seconds
thanx -
Question about scope in the enum example in the Java Tutorial
Hi,
On page http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html of the Java tutorial the enumeration MONDAY is not prefixed with the enum name when it is used in the function tellItLikeItIs.
public class EnumTest {
Day day;
public EnumTest(Day day) {
this.day = day;
public void tellItLikeItIs() {
switch (day) {
case MONDAY: System.out.println("Mondays are bad.");
break;
case FRIDAY: System.out.println("Fridays are better.");
break;How does the compiler know that MONDAY is the same as Day.MONDAY? Is it because of
switch(day)Then later in the main MONDAY must be prefixed with Day. I removed Day. and it did not compile. Why is Day. necessary in main but not in tellItLikeItIs?
public static void main(String[] args) {
EnumTest firstDay = new EnumTest(Day.MONDAY);
firstDay.tellItLikeItIs();Thank you.swtich is a special case.
The label for each 'case' of a switch
will infer based on the type of switch value
switch(d) {
case MONDAY:
case TUESDAY:
will automatically refer to the MONDAY and TUESDAY
corresponding to d's type. -
"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 -
Error when compiling the J2ee tutorial source files on win2k professional
Hi,
Could you help me?
I'm trying to complete the j2ee tutorial.
I have downloaded the example code, J2EE Sdk, J2SE and Ant from the web site (these files� name are: j2ee-1_3-doc-tutorial-draft3.zip, j2sdkee-1_3_01-win.exe, j2sdk-1_3_1_01-win.exe, jakarta-ant-1.3-bin.zip) and installed the �j2sdkee-1_3_01-win.exe, j2sdk-1_3_1_01-win.exe� and unzipped �j2ee-1_3-doc-tutorial-draft3.zip, jakarta-ant-1.3-bin.zip� to their default subdirectory.( jdk1.3.1_01,
j2sdkee1.3,jakarta-ant-1.3)
According to instructions, I have set the Environment Variables as the below:
ANT_HOME=c:\jakarta-ant-1.3
CLASSPATH=c:\sybtools\ASEP\Monclass.zip;c:\sybtools\ASEP\3pclass.zip;c:\program files\microsoft sql server 2000 jdbc\lib\mssqlserver.jar;c:\program files\microsoft sql server 2000 jdbc\lib\msbase.jar;c:\program files\microsoft sql server 2000 jdbc\lib\msutil.jar;c:\orcle\ora81\jdbc\lib\classes12.zip; c:\orcle\ora81\jdbc\lib\nls_charset12.zip;c:\program files\oracle\jdevelop 3.2.3\jdbc\lib\oracle8.1.7\classes12.zip;c:\j2sdkee1.3\lib\j2ee.jar;c:\jdk1.3.1_01\lib\tools.jar;c:\jdk1.3.1_01\lib\classes.zip;c:\jakarta-ant-1.3\lib\ant.jar
HOMEPATH=\
J2EE_HOME=c:\j2sdkee1.3
JAVA_HOME=c:\jdk1.3.1_01
OS=Windows_NT
Os2LibPath=C:\WINNT\system32\os2\dll;
Path=C:\oracle\ora81\bin;C:\oracle\ora81\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program Files\Oracle\jre\1.1.7\bin;C:\PROGRA~1\REFLEC~1;C:\Program Files\Reflection;C:\WINNT\SYSTEM32;C:\WINNT;C:\WINNT\SYSTEM32\WBEM;C:\DMI\WIN32\BIN;C:\Program Files\Symantec\pcAnywhere\;C:\MSSQL7\BINN;C:\Sybase\DLL;C:\Sybase\BIN;C:\sybtools\WIN32;C:\sybtools\ASEP;c:\oracle\ora81\jdbc\lib;c:\j2sdkee1.3\bin;c:\jdk1.3.1_01\bin;c:\jakarta-ant-1.3\bin
SystemRoot=C:\WINNT
windir=C:\WINNT
�
After finishing the above actions, I have started the j2ee server and deploytools successfully. But when I executed the following command( ANT CONVERTER ) under the appointed subdirectory, the error occurred.
The information is
�Exception in thread �main� java.lang.NoClassDefFoundError: files\Microsoft �.
Looking forward to the answer!
Arthur Ward
2001-12-21by the way, after checking the ant_home\bin\ant.bat(see bellow)
-------end quote----
@echo off
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart
@setlocal
rem %~dp0 is name of current script under NT
set DEFAULT_ANT_HOME=%~dp0
rem : operator works similar to make : operator
set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME:\bin\=%
if %ANT_HOME%a==a set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=
rem On NT/2K grab all arguments at once
set ANT_CMD_LINE_ARGS=%*
goto doneStart
:win9xStart
rem Slurp the command line arguments. This loop allows for an unlimited number of
rem agruments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=
:setupArgs
if %1a==a goto doneStart
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.
rem find ANT_HOME
if not "%ANT_HOME%"=="" goto checkJava
rem check for ant in Program Files on system drive
if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
set ANT_HOME=%SystemDrive%\Program Files\ant
goto checkJava
:checkSystemDrive
rem check for ant in root directory of system drive
if not exist "%SystemDrive%\ant" goto noAntHome
set ANT_HOME=%SystemDrive%\ant
goto checkJava
:noAntHome
echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
goto end
:checkJava
set _JAVACMD=%JAVACMD%
set LOCALCLASSPATH=%CLASSPATH%
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
if "%JAVA_HOME%" == "" goto noJavaHome
if "%_JAVACMD%" == "" set JAVACMD=%JAVAHOME%\bin\java
if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\tools.jar"
if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\classes.zip"
goto checkJikes
:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java
echo.
echo Warning: JAVA_HOME environment variable is not set.
echo If build fails because sun.* classes could not be found
echo you will need to set the JAVA_HOME environment variable
echo to the installation directory of java.
echo.
:checkJikes
if not "%JIKESPATH%" == "" goto runAntWithJikes
:runAnt
%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS%
org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
goto end
:runAntWithJikes
%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" -Djikes.class.path=%JIKESPATH%
%ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
:end
set LOCALCLASSPATH=
set _JAVACMD=
set ANT_CMD_LINE_ARGS=
if not "%OS%"=="Windows_NT" goto mainEnd
:winNTend
@endlocal
-------end quote----
i found something is wrong with the sentence in ":runAnt".
--------quote-----
%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS%
org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
--------end quote-----
No value was set for %ANT_OPTS% and %ANT_CMD_LINE_ARGS% -
Hey there ! i have a question , i am following the JavaEE Tutorial 9.1 (sep.2007), and i am wondering if the examples in this book (Duke's Bookstore, Duke's Bank, CoffeeBreak) can be deployed using BEA Weblogic Server 9.2 or newer (even maybe imported into their BEA Workshop instead of NetBeans?)...and if this can be done,do you have any ideas on how...or what is the best approach?
Thank you in advance !neodude wrote:
Hey there ! i have a question , i am following the JavaEE Tutorial 9.1 (sep.2007), and i am wondering if the examples in this book (Duke's Bookstore, Duke's Bank, CoffeeBreak) can be deployed using BEA Weblogic Server 9.2 or newer (even maybe imported into their BEA Workshop instead of NetBeans?)...and if this can be done,do you have any ideas on how...or what is the best approach?
If it can't be done, the Java EE spec is a lie. You should be able to deploy any Java EE app on a compliant app server.
The trick is writing the code so it doesn't depend on which app server you're using and adding the app-specific configuration that you need.
You should be able to add in a weblogic-application.xml and be good to go.
Best advice? Try it.
% -
Problems building the sample Apps for JSF
I m trying to build the sample Apps provided as part of the JWSDP 1.3 for jsp after making some changes.
The JSF tutorial says to run tne "ant" command after making changes to the build.properties file.
The problems i am facing are:
1. It says to specify the username/passowrd . I do not see anything like that in build.properties.
2. For building it says to excute "ant" command. But that comes back with errors just specifying the usage which is similar to java usage. I have set all the variables like JSF_HOME, ANT_HOME, JWSDP_HOME etc to the correct values..
Can anyhelp me by pointing me to how to rebuild these samples..
BTW i am using the Tomcat that cam bundled with JWSDP 1.4
Thanks
SJI also had some problems building the examples. As I use WinXP, I can't really help unfortunately. But I would like to mention, that a stand-alone JSF EA Version wouldl be great and definitely make it easier for newbies to get contac to this technology.
Another recommendation would be to have a jsf-blank.war, that contains all necessary libs, config files, etc. without references to other downloads. This way I am sure, that many people more would be fascinated.
I guess that JSF will be available as such a standalone version in the end, but it would also be nice to have it right now, even as an EA.
cu
sven
Maybe you are looking for
-
How do I access and use my main computer over my local network ?
I have a wireless internet connection that currently runs from the outside antenna into the house via ethernet. My internet provider is setting up a second wireless system so that a computer 1/2 mile away can share the connection. I believe they are
-
Balance sheet Open Item Analysis (FAGLF101)
HI, When I run this transaction, I am getting the error message "Account determination for transaction V05 not maintained for account 123456". But in fact the account determination was maintained in OBBV. Actually I am new to new GL. This error messa
-
I have a fillable PDF that I created with Formscentral, now I want my employees to be able to distribute it with their own emails. When they try to upload the form, it says it can't because it was "already distributed by forms central." Any ideas?
-
Incorrect value getting fetched
Hi in my requirement I want to fetch the wbs element based on the prefixed placed in it .I have coded as follows for one part check gw_auak-objnr CA 'PR'. SELECT pspnr FROM prps INTO TABLE gi_prps WHERE objnr = gw_auak-objnr. Here the value is
-
Oracle parameter distributed_lock_timeout
I am getting an application error : ORA-02049: timeout: distributed transaction waiting for lock error? How do I keep the ORA-02049 from happening?how to modify this parameter?