Pet store 2.0 + Netbeans + Glassfish + ubuntu 7.04 install problem solved
Three days ago I tried to install the javapetstore-2.0-ea5 using the following combination:
Netbeans 5.5.1
Glassfish v1
ubuntu 7.04.
I am new to java and java EE so I could n' t easily figure out the solutions to the problems that I have faced. Generally, the procedure was easy but there was a problem that i could n' t resolve easily, but after a very close observation. The problem is that the instructions guide to change the file build.properties and specially the directive:
javaee.server.passwordfile
It should have as value the path to the password file of glassfish. But here is the problem. The passwordfile in glassfish v1, doesn' t have the following form:
AS_ADMIN_PASSWORD=<javaeesdk-admin-password>
but
AS_ADMIN_ADMINPASSWORD=<javaeesdk-admin-password>
This results to the failure of the creation fo datasource and jdbcpool for the database of petstore.
To solve the problem, you just have to change the directive inside the password file, to AS_ADMIN_PASSWORD.
C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml:468: Deployment error: cannot find FileArchive class...
See the server log for details.
BUILD FAILED (total time: 2 seconds)I had the same problem but not with blueprints and I managed to start manually the sun server, clean and build the project and copy the *.war file from the project_folder/dist/ to C:\Sun\SDK\domains\domain1\autodeploy.
If this doesn't work you could try to reinstall netbeans and java .
Similar Messages
-
hi, iam quite new to java, and i have been trying to install the demo for java pet store.
I run windows xp, and have installed j2sdkee1.3.1 on my c drive, ie c:\j2sdkee1.3.1
how do i set the enviroment variables?
do i add them to the user variables or system variables??
in the instructions it says
JAVA_HOME must point to the root directory of your J2SE SDK installation. For example, if you installed the J2SE SDK in c:\jdk1.3.1, then that path should be the value of JAVA_HOME.
J2EE_HOME must point to the root directory of your J2EE SDK installation. For example, if you installed the J2EE SDK in /usr/local/java/j2sdkee1.3.1 , then that path should be the value of J2EE_HOME.
could someone explain the second part to me?
thanks for any helphi, iam quite new to java, and i have been trying to
install the demo for java pet store.
I run windows xp, and have installed j2sdkee1.3.1 on
my c drive, ie c:\j2sdkee1.3.1
how do i set the enviroment variables?
do i add them to the user variables or system
variables??
in the instructions it says
JAVA_HOME must point to the root directory of your
J2SE SDK installation. For example, if you installed
the J2SE SDK in c:\jdk1.3.1, then that path should be
the value of JAVA_HOME.
J2EE_HOME must point to the root directory of your
J2EE SDK installation. For example, if you installed
the J2EE SDK in /usr/local/java/j2sdkee1.3.1 , then
that path should be the value of J2EE_HOME.The paragraph above is for UNIX users. You should set your J2EE_HOME=C:\j2sdkee1.3.1
>
could someone explain the second part to me?
thanks for any help -
Pet Store 2 example in netbeans
Hello, ppl im trying to run the pet store 2 example given in this page:
https://blueprints.dev.java.net/petstore/usingnetbeans.html
using netbeans but i dont understand how to make it work, i;ve downloaded the jar file but if in netbeans i open a proyect but i cant open the jar as a project, can anybody help me? and later i would like to open it in Creator, is it possible?
Tnks in advance!
BelthazorOkay, the solution: don't let the text
"2. Download and install the Java Pet Store Reference application. Click here (https://blueprints.dev.java.net/downloads.html) to download the JAR file. ..."
mislead you like it did to me.
There's no JAR file to download if you want to import Petstore in Netbeans. On page https://blueprints.dev.java.net/downloads.html don't choose "Web 2.0 Java Pet Store Application", click "Java BluePrints in Java EE SDK" instead. You have to download the full "Java BluePrints" example package (ZIP file) bundled with Java EE 5 SDK Update 2 OR just the package itself on the same page (http://java.sun.com/javaee/downloads/index.jsp) under section "Download the Components Independently".
Have a nice day! -
How to create search index files for Java Pet Store
Hi All,
As you may know, the java pet store application uses for the search function a search index object, which itself uses the following files '_36.cfs', 'deletable', 'segments'.
Now as I want to change the data of the database (delete some pets, and names, etc.), it does not have an effect on the search results. This is because the application uses the search index files and does not use the database for the search query.
So can anybody help me and tell me how I can create this three files from my *.sql file, so I can search in my own data?
Thank you very much for your help.
Regards,
Wolfganggonso777 wrote:
Solved:
I had the same problem. It seems that the installer does not unzip three files where it should.
With NetBeans (Using File Perspective) or just editing build.xml
Netbeans: select build.xml/Run Target/Other Targets/unzipindexes: Tough it should work it fails in resolving $javaee.domaindir$ at least in my system, but it does suscessfully create a new directory named ${jee.domaindir} that includes lib/petstore/searchindex and three files: _36.cfs , deletable, segments.
Copy those three files to your_glasshfish_path/domains/domain1/petstore/searchindex.
Now you are done. I hope that you had a nice time while waiting two years for it to be answered. How is it that it is not answered anywhere else?
Regards,
Ramon Talavera
www.sciencetechworks.comThanks. I didn't wait 2 years for this, but I just replied on a 2 year old post. I only recently tried the petstore app. I thought I needed to study lucene first to figure things out, it turns out there was an 'internal target' on the build file for this. Thanks a bunch! -
Failed restarts of Java Pet Store 2.0
Hi,
I am having a recurring problem with the Java Pet Store 2.0 that I hope someone can help shed light on.
I am trying to use the Pet Store as a reference for a project. I have performed the following sequence on a Dell latitude laptop running Windows XP Pro SP2:
Download and install JDK 1.5.0_11
Download and install Java EE 5 w/ tools
Launch NetBeans
Open the Java Pet Store project that comes embedded in the EE
Start DB server (if not already started)
Start Java System Application Server 9
Check build.properties
Run Target setup.xml
Open pet store project
This works on the initial launch. The problem comes when I shut everything down and turn off the laptop, then try to run the project in NetBeans again the next time I start up. Every time I try, after I start the DB server and App server and even re-target setup.xml, when I try to run the project, I get the same exception (see below). Even my newbie brain realizes that the issue involves the FileArchive class. What it can't figure out is what I should do about it in order to be able to run the darn project more than one time. Can anybody guide me? Thanks in advance for any help.
Here is the log of the failed petstore run (this same exception has occurred on attempted restarts after multiple installs):
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
Copying 1 file to C:\Sun\SDK\blueprints\petstore\build\web\WEB-INF\classes
Duplicated project name in import. Project petstore-impl defined first in C:\Sun\SDK\blueprints\petstore\nbproject\ant-deploy.xml and again in C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml
insert-proxy-settings:
Duplicated project name in import. Project petstore-impl defined first in C:\Sun\SDK\blueprints\petstore\nbproject\ant-deploy.xml and again in C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml
dojo:
compile:
compile-jsps:
Building jar: C:\Sun\SDK\blueprints\petstore\dist\petstore.war
do-dist:
dist:
Incrementally deploying petstore_localhost:4848_server
Completed incremental distribution of petstore
Incrementally redeploying petstore_localhost:4848_server
Start registering the project's server resources
Finished registering server resources
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeploymentFacility.getFileArchive(DirectoryDeploymentFacility.java:186)
at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeploymentFacility.incrementalDeploy(DirectoryDeploymentFacility.java:77)
at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeployment.incrementalDeploy(DirectoryDeployment.java:154)
at org.netbeans.modules.j2ee.sun.ide.j2ee.incrdeploy.DirectoryDeploymentFacade.incrementalDeploy(DirectoryDeploymentFacade.java:123)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:502)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:106)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
Caused by: java.io.FileNotFoundException: C:\Program Files\netbeans-5.5\bin\${com.sun.aas.installRoot}\blueprints\petstore\build\web
at com.sun.enterprise.deployment.deploy.shared.FileArchive.open(FileArchive.java:66)
... 22 more
java.lang.IllegalStateException: cannot find FileArchive class...
at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeploymentFacility.incrementalDeploy(DirectoryDeploymentFacility.java:79)
at org.netbeans.modules.j2ee.sun.bridge.DirectoryDeployment.incrementalDeploy(DirectoryDeployment.java:154)
at org.netbeans.modules.j2ee.sun.ide.j2ee.incrdeploy.DirectoryDeploymentFacade.incrementalDeploy(DirectoryDeploymentFacade.java:123)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:502)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:106)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml:468: Deployment error:
cannot find FileArchive class...
See the server log for details.
BUILD FAILED (total time: 2 seconds)C:\Sun\SDK\blueprints\petstore\nbproject\build-impl.xml:468: Deployment error: cannot find FileArchive class...
See the server log for details.
BUILD FAILED (total time: 2 seconds)I had the same problem but not with blueprints and I managed to start manually the sun server, clean and build the project and copy the *.war file from the project_folder/dist/ to C:\Sun\SDK\domains\domain1\autodeploy.
If this doesn't work you could try to reinstall netbeans and java . -
Is it possible to obtain the src of pet store 2.0 without CVS?
Is there any way I could obtain the petstore 2,0 as a zip file like it used to be in pet store 1.3.2?
Please, let me know where I can get it?
It is amazing, all the download button in Sun link to yet another place of blueprints.
previous sites with download link says with source code but blueprint download only as *.class
file inside of installer file.
Also, http://blog.naver.com/bluejames77/80049199960 says No. 2
2. 더블클릭해서 압축을 푼다음 index.html을 보면
Java EE 5 Application Server을 설치하거나 혹은 GlassFish Project를 설치하라고 나온다.
Translate ----
after unzip, there is index.html file which specifies to install Java EE 5 application server or glass fish project.
But, no index.html when I download the same date installer. In fact, any one can go to the CVS site and see
under www/ there is no *.java file???? only html file???
Is there anyway somebody in blueprint who just create source zip file like it used to be in 1.3.2?
with setup.xml and build.xml and link up there? It will say one day work for somebody.
Also ERROR -
http://webdev2.sun.com/petstore/faces/catalog.jsp?catid=Cats
Also, shows error! at chrome I don't know at iexplorer.
please try -You have to execute the installer jar file.
This will create a folder with all the source codes inside.
I wasn't aware of any need for cvs. -
J2EESDK-1_4_03 compatability with Java Pet Store
I am trying to install Java Pet Store (WIndows XP Prof) and have j2se 1.4.11 and J2EESDK-1_4_03 also but from following the install instructions on Java Pet Store, I've to run cloudscape.bat and j2ee.bat from the %J2EE_HOME%\bin folder and they are not contained in there. In fact, they are not anywhere in the entire folder.
Any suggestions. I could download J2EE-1.3 but I dont think its compatible with Windows XP Prof as when I go to run the file it keeps crashing on me!
Please any suggestions. Thanksin case that you are new , i should suggest you the follwoing steps
1- you should get J2EE tutorial from sun site
http://java.sun.com/j2ee/1.4/download.html
2-get Netbeans IDE 5 from the following link
http://www.netbeans.info/downloads/download.php?type=5.0
and now goto the Document home of Netbeans 5 , look under Tutorials for j2ee , I think it is right place for you to start.
http://www.netbeans.org/kb/50/quickstart-j2ee.html
Dealing with application servers and trying to deploy an application using deploy tools maybe kinda hard.
Masoud Kalali
http://weblogs.java.net/blog/kalali/ -
Best Regards
I would like to know which site I can download the sample application called Pet Store, I searched the web and all links lead me to the java.net site, but can not find where to download the. jar.
I appreciate the attention.Thank you very much for responding. However, explore the site, and the links redirect me to the java.net site showing the error "NOT FOUND" The Page You Were looking for does not exist. You May Have mistype the address or the page May Have moved.
-
Hi, my pet store has set up fine .
when go to pet store add something to the cart, verify the shipping address and
at time of clicking on continue to ship, it gives me huge error saying ,"insert
no successful".
If I continue working in the same session with the same very instance of browser
it gives me the foll error:
Server Error
Bean has been deleted.
Oops! Your request cannot be completed. The server got the following error.
com.sun.j2ee.blueprints.petstore.control.exceptions.GeneralFailureException:
Bean has been deleted.
at com.sun.j2ee.blueprints.petstore.control.web.ShoppingClientControllerWebImpl.handleEvent(ShoppingClientControllerWebImpl.java:142)
at com.sun.j2ee.blueprints.petstore.control.web.RequestProcessor.processRequest(RequestProcessor.java:84)
at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doProcess(MainServlet.java:111)
at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
If anybody can help me out with this...
---------anjali"Anjali" <[email protected]> wrote in message
news:3be1269e$[email protected]..
>
Hi, my pet store has set up fine .
when go to pet store add something to the cart, verify the shippingaddress and
at time of clicking on continue to ship, it gives me huge error saying,"insert
no successful".
If I continue working in the same session with the same very instance ofbrowser
it gives me the foll error:
Server Error
Bean has been deleted.
Oops! Your request cannot be completed. The server got the followingerror.
>
>
>
com.sun.j2ee.blueprints.petstore.control.exceptions.GeneralFailureException:
Bean has been deleted.
atcom.sun.j2ee.blueprints.petstore.control.web.ShoppingClientControllerWebImpl
.handleEvent(ShoppingClientControllerWebImpl.java:142)
atcom.sun.j2ee.blueprints.petstore.control.web.RequestProcessor.processRequest
(RequestProcessor.java:84)
atcom.sun.j2ee.blueprints.petstore.control.web.MainServlet.doProcess(MainServl
et.java:111)
atcom.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.j
ava:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
If anybody can help me out with this...
---------anjaliafter editing the customer_ejb.xml file as detailed here:
http://e-docs.bea.com/wls/docs61/petstore/bea_deployathon.html#oracle you
need to rebuild the Petstore (step 6 of the same doc) and redeploy it.
HTH
Bill -
Where to find the OC4J-ready Pet Store Demo file jps112.zip
where to find the OC4J-ready Pet Store Demo file jps112.zip in OTN
So that we may better diagnose DOWNLOAD problems, please provide the following information.
- Server name
- Filename
- Date/Time
- Browser + Version
- O/S + Version
- Error MsgYou have to execute the installer jar file.
This will create a folder with all the source codes inside.
I wasn't aware of any need for cvs. -
Question on threading in Java Pet Store
In the Java Pet Store, the MainServlet pulls the RequestProcessor and ScreenFlowManager objects from the ServletContext object. Once returned, the request is processed by methods in these objects. Since the ServletContext object and the objects that it contains are considered not to be thread-safe, how does the utilization of these shared objects not cause thread issues? Thanks for your help.
These objects are used in a read-only fashion, hence there should be no problems related to thread-safety.
-
Getting Java Pet Store to run in JBuilder (or any IDE)
I'm getting a dozen or so errors like:
"XMLDocumentUtils.java": method getPublicId() not found in interface org.w3c.dom.DocumentType
when I try to import & build Java Pet Store in JBuilder Enterprise. I've told JBuilder to include j2ee.jar, and I can run the precompiled JPS just fine, with J2EE_HOME pointing at that jar. The getPublicId method is listed for DocumentType in http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html.
What gives? Anybody had success rolling their own Pet Store?
Is there any common utility for inspecting class files?The problem evidently was that JBuilder was picking up an obsolete version of the class somewhere along the line- problem solved by moving j2ee.jar to the top of the list of Required Libraries.
-
Java Pet Store and connection pooling
Hi. Does the Java Petstore version 1.2 use connection pooling? I know in the database.properties file it has the following variables:
Pool.MaximumActiveConnections=10
Pool.MaximumIdleConnections=5
Pool.MaximumCheckoutTime=120000
Pool.TimeToWait=10000
Pool.PingEnabled=false
Pool.PingQuery=select * from dual
Pool.PingConnectionsOlderThan=0
Pool.PingConnectionsNotUsedFor=0
Pool.QuietMode=true
To me this seems like it is using connection pooling. However, on our server, we are continually running out of connections and I KNOW that our other apps ARE using connection pooling. So I'm just wondering if someone can confirm with me that the Java Pet Store is in fact using connection pooling.
Thanks in advance,
DylanI forgot to mention that I'm using the Ibatis version of the JPetstore.
-
how product.screen,main.screen,item.screen and so on ,these are handled in java pet store source code?
Todd,
SQL*Plus is a utility that is bundled with the Oracle database server.
Yes, you start it with the "sqlplus" command. Seeing as you seem to
also be in charge of setting up the Oracle database server, that means
you (inevitably) have to do some "DBA" type work. Since you say that
you are new to this, I suggest reading the documentation for the Oracle
database server -- which is available from:
http://tahiti.oracle.com
Of-course, your other option would be to find an experienced DBA to
handle the database stuff for you.
By the way, you can use the "lsnrctl" utility (also bundled with the
database server product) to start, test, and stop the database "listener".
The command is "lsnrctl". There is also documentation available for
it (from the same URL as shown above).
Good Luck,
Avi. -
Duplicate key exception in Pet Store
When signing into Pet Store javax.ejb.DuplicateKeyException is received even though a new
and unique ID is being created when the sigin is performed through the Account page.
Looking at diagnostic traces, one can see that the create customer logic is driven twice.
The second time it tries to create the ID it fails with a DuplicateKeyException. When
first Creating a new account via the "Sign In" link or Creating a new account following a
CheckOut you do not get the exception.
Scenario:
1) Go to Pet Store.
2) Select "Enter the store".
3) Select Account on the Pet Store Main Page.
4) Since you have not signed in, you are presented with the sign in screen. On that
screen, create a unique User ID and Password.
5) Update your account information and select Submit on the Account information page.
6) The failure occurs.Hi,
This does not seem to be a bug on other systems, so perhaps something is a bit off in your environment? Try to shut down j2ee and the cloudscape DB, run the cleanup script from the bin directory of the RI app server, then restart the app server and DB, and redeploy the petstore.
You may want to send this to the interest list next time
http://archives.java.sun.com/archives/j2eeblueprints-interest.html
hope that helps,
sean
Maybe you are looking for
-
Can we call another transaction from the Userexit
Hi all, Can we call another transaction from the Userexit? Thanks, Balaji
-
How to move Photoshop CS5 to my new computer?
On my Imac I have Photoshop CS5. I'm satisfied with it and don't want to spend money to upgrade it to the latest version of Photoshop. I bought the latest Imac and I want to move Photoshop to this computer. It doesn't have a CD-player anymore, so I h
-
Hi: I'm New to Keynote and I started to work with it and when I go to adjust an image nothing happens. Its like the controls are all frozen...Its strange because I have iPhoto too and all of the image adjust controls disappeared for that. Anyway, any
-
Hi , Can anyone guide me how to hide the User mapping tab from the user profile page of personalize link available in the mast head. When the user cliscks on the link personalize in the mast head , he can see the user profile page . I want to hide th
-
Hi my iPhone 4S wifi button can't turn on it is in gray color.. What can I go?