Thread: Problem deploying tutorial application to standalone oc4j server


Permlink Replies: 1 - Pages: 1 - Last Post: Aug 12, 2008 6:47 PM Last Post By: Steve Button
user9529745

Posts: 3
Registered: 08/01/08
Problem deploying tutorial application to standalone oc4j server
Posted: Aug 12, 2008 8:33 AM
Click to report abuse...   Click to reply to this thread Reply
Hi.

We have Jdeveloper 10.1.3.4 running on windows xp and the standalone oc4j server 10.1.3.3 running on Solaris 10. I've just gone through the tutorial on deploying to a standalone oc4j server (http://www.oracle.com/technology/obe/obe1013jdev/10131/deployment/deployment.htm) and it all worked fine after I used Jdeveloper on Solaris to install the ADF runtime.

I just stepped through the tutorial to build a web app using jdeveloper (http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm) and it works fine on the embedded oc4j server in jdeveloper.

I tried to use the same techniques from the first tutorial to deploy this application to my standalone oc4j install on Solaris. I created the deployment project, created the .jar, .war and .ear and deployed to oc4j. This was successful according to jdeveloper but i get "500 internal server error" when visiting the page (http://oursite:8888/HR_EJB_App/faces/deptEmployees.jspx):

oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: javax.naming.NameNotFoundException, msg=HRFacade not found
at oracle.adf.model.adapter.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:177)
at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
at oracle.adf.model.BindingContext.get(BindingContext.java:457)

etc... etc...

I also noticed that when I started up my oc4j standalone server on Solaris I was given an error several times, seemingly for each class in my application:

bash-3.00# java -jar oc4j.jar
08/08/12 16:14:45 Java Accessibility Bridge for GNOME loaded.

2008-08-12 16:14:59.090 NOTIFICATION property toplink.server.platform.class.name is deprecated, property toplink.target-server should be used instead.
2008-08-12 16:14:59.830 WARNING oracle.classloader.util.AnnotatedClassNotFoundEx ception:

Missing class: datamodel.HRFacadeBean

Dependent class: oracle.toplink.essentials.ejb.cmp3.persistence.Persiste nceUnitProcessor
Loader: oracle.persistence:1.0
Code-Source: /export/home/OC4J/toplink/jlib/toplink-essentials.jar
Configuration: <code-source> in /export/home/OC4J/j2ee/home/config/ser ver.xml

This load was initiated at HR_EJB_AppApplication.root:0.0.1 using the loadClass( ) method.

The missing class is not available from any code-source or loader in the system. was thrown on attempt of PersistenceLoadProcessor to load class datamodel.HRFac adeBean. The class is ignored.

I'm sure this is a simple config problem but as I am very new to Oracle/JSF/ADF/OC4J I can't seem to find how to fix it. It is strange that it works on the embedded server but does not work when deployed to my standalone server. what do I need to change on the standalone server to get it to work?

thanks a lot,
James
Steve Button

Posts: 1,920
Registered: 01/10/01
Re: Problem deploying tutorial application to standalone oc4j server
Posted: Aug 12, 2008 6:47 PM   in response to: user9529745 in response to: user9529745
Click to report abuse...   Click to reply to this thread Reply
Hi James --

That's a good writeup of the problem you are facing, thanks!

Missing class: datamodel.HRFacadeBean

Dependent class: oracle.toplink.essentials.ejb.cmp3.persistence.Persiste nceUnitProcessor
Loader: oracle.persistence:1.0
Code-Source: /export/home/OC4J/toplink/jlib/toplink-essentials.jar
Configuration: <code-source> in /export/home/OC4J/j2ee/home/config/ser ver.xml

It looks like you have a packaging issue where the specified class "datamodel.HRFacadeBean" is missing from the EJB JAR file that you have built as part of the tutorial.

This is what is leading to the top level exception you are seeing:

Unexpected exception caught: javax.naming.NameNotFoundException, msg=HRFacade not found

Since the bean class could not found and instantiated.

Unfortunately I'm not familiar with the tutorial in any depth so can't directly assist. I'd go back and look at any deployment profiles you created for the business/service layer (I think that's what they call this section of the app) and ensure you have all the required classes checked (specifically this one -- datamodel.HRFacadeBean).

If you still can't get it sorted out, the best bet would be for you to repost this to the JDeveloper forum here on OTN -- that tutorial is one of theirs and they are likely to be very familiar with it.

-steve-
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums