JSP/EJB sample-problem
Hi,
I'm having difficulties to get the Oracle JSP sample to wrok.
I deployed the JSP App and also the StackDemo app and changed the envrionment variables as requested .
But each time I try to use the DemoStack bean by submitting a 'create stack' I get the message :
"The requested access method is not allowed for that object"
Can anybody help me with this problem?
Michel.
Alex,
I use OAS 4.0.8.1.
I also reloaded the application after deployment.
I used a clinet snippet that is compiled in JDevelope 3.0 and I run it from there .
It finds THE EJB , ic reated and deployed without giving any error messages. The problem rises the moment I try to use one of the functions of the remote interface of the EJB. In these functions I try to use functionality of viewObjects that are provided by a bussines component that I generated using JDeveloper 3.0.
The wrb log file mentions a 'null pointer exeption'.
I think that I do something wrong when initializing the application module that wraps the business component, but I can't see what is wrong.
This is the code I use in my EJB :
String theAM = "EDMpackage.EDMAppModule";
ApplicationModule root = null;
String sessionDefName = ApplicationModule.DEFAULT_DEF_FULL_NAME;
Hashtable env = new Hashtable(2);
env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
try
Context ic = new InitialContext(env);
ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(sessionDefName);
root = home.create();
catch(Exception e)
e.printStackTrace();
localAppMod = root.createApplicationModule( "EDMAppMod",theAM );
This works fine , but when I try to get a ViewObject through the localAppMod, I get the error. So I think I am wrong somewhere here.
Michel.
Similar Messages
-
■■I can't debug the xml_xslt_content EJB sample in the examplesWebApp !!
■■I can't debug the xml_xslt_content EJB sample in the examplesWebApp
start the Example Server
http://localhost:7001/console
among the deployed EJB ,the xml_xslt_content EJB how to run
Is the related jsp page in \bea\wlserver6.0\samples\examples\xml\xslt ?????
in the
\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\web.xml
there are
<taglib-location>
/WEB-INF/lib/xmlx-tags.jar
</taglib-location>
</taglib>
in line471
but i did not find the xmlx-tags.jar
in the \bea\wlserver6.0
who can help me ??????????As this is your 3rd post on this subject, Please tell us what the problem is, I did reply to both your 1st and 2nd post, and whilst I agree that my 1st post did not give an adequate reply (I misunderstood the problem), I think my second reply was adequate and I did offer to help further if you had problems, (please remember that I have to work as well as trying to help other users on the forum).
My 2nd reply was as follows:
If you wish to use the IIS server then go to: http://www.microsoft.com/Web/
and download the Microsoft web platform.
This 2nd option here is best if you are using php or are a beginner -
If you wish to use an apache server try: http://httpd.apache.org/download.cgi
or for a fuller installation (server/mysql/php)
http://www.wampserver.com/en/download.php
Don't forget to get the documentation as well!
HTH
PZ
Once you have one of these working (or have a problem with), then please return.
Message was edited by: pziecina
If there is anything you do not understand, or require help with please reply to the original post, but as David Powers says any abusive language will prevent me (and others), from replying (I did not see the previous moderated post).
PZ -
I can't debug the xml_xslt_content EJB sample in the examplesWebApp !!
start the Example Server
http://localhost:7001/console
among the deployed EJB ,the xml_xslt_content EJB how to run
Is the related jsp page in \bea\wlserver6.0\samples\examples\xml\xslt ?????
in the
\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\web.xml
there are
<taglib-location>
/WEB-INF/lib/xmlx-tags.jar
</taglib-location>
</taglib>
in line471
but i did not find the xmlx-tags.jar
in the \bea\wlserver6.0
who can help me ??????????As this is your 3rd post on this subject, Please tell us what the problem is, I did reply to both your 1st and 2nd post, and whilst I agree that my 1st post did not give an adequate reply (I misunderstood the problem), I think my second reply was adequate and I did offer to help further if you had problems, (please remember that I have to work as well as trying to help other users on the forum).
My 2nd reply was as follows:
If you wish to use the IIS server then go to: http://www.microsoft.com/Web/
and download the Microsoft web platform.
This 2nd option here is best if you are using php or are a beginner -
If you wish to use an apache server try: http://httpd.apache.org/download.cgi
or for a fuller installation (server/mysql/php)
http://www.wampserver.com/en/download.php
Don't forget to get the documentation as well!
HTH
PZ
Once you have one of these working (or have a problem with), then please return.
Message was edited by: pziecina
If there is anything you do not understand, or require help with please reply to the original post, but as David Powers says any abusive language will prevent me (and others), from replying (I did not see the previous moderated post).
PZ -
Environment: Windows NT4, sp5, WLS 5.1/sp 2, Sun JDK1.2.2
As illustrated in 'Introduction to BEA Weblogic Server', pp 101-102, I'm
compiling the Emp EJB sample. I successfully compiled the java programs,
moved the XML files, and created the initial JAR file. Next the sample says
to run ejbc on the JAR file. When I do I get the following error:
G:\weblogic\examples\intro\ejbtemp>java -Dweblogic.home=%WL_HOME%
weblogic.ejbc Emp.jar -d %WL_HOME%\myserver\Emp.jar
java.lang.ClassCastException
at
weblogic.xml.dom.DOMUtils.getOptionalElementsByTagName(DOMUtils.java,
Compiled Code)
at
weblogic.xml.dom.DOMUtils.getOptionalElementByTagName(DOMUtils.java:170)
at
weblogic.xml.dom.DOMUtils.getOptionalValueByTagName(DOMUtils.java:97)
at
weblogic.ejb.deployment.dd.EJBReadDOM.getDescriptionValue(EJBReadDOM.java:40
4)
at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader.java:200)
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
ERROR: java.lang.ClassCastException
Any idea what may be causing this?try to use the build script in the examples directory..
It is available for all examples.
so after running setenv
go the example u want and run the build.cmd
it should work
Steve Vago wrote:
Environment: Windows NT4, sp5, WLS 5.1/sp 2, Sun JDK1.2.2
As illustrated in 'Introduction to BEA Weblogic Server', pp 101-102, I'm
compiling the Emp EJB sample. I successfully compiled the java programs,
moved the XML files, and created the initial JAR file. Next the sample says
to run ejbc on the JAR file. When I do I get the following error:
G:\weblogic\examples\intro\ejbtemp>java -Dweblogic.home=%WL_HOME%
weblogic.ejbc Emp.jar -d %WL_HOME%\myserver\Emp.jar
java.lang.ClassCastException
at
weblogic.xml.dom.DOMUtils.getOptionalElementsByTagName(DOMUtils.java,
Compiled Code)
at
weblogic.xml.dom.DOMUtils.getOptionalElementByTagName(DOMUtils.java:170)
at
weblogic.xml.dom.DOMUtils.getOptionalValueByTagName(DOMUtils.java:97)
at
weblogic.ejb.deployment.dd.EJBReadDOM.getDescriptionValue(EJBReadDOM.java:40
4)
at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader.java:200)
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
ERROR: java.lang.ClassCastException
Any idea what may be causing this? -
Hi Experts,
Can you suggest me some good books on java , javascript.The books should include the internals of Servlets,JSP,EJB.
Thanks
vishalhttp://forum.java.sun.com/thread.jspa?forumID=54&threadID=756427&start=7
http://forum.java.sun.com/thread.jspa?forumID=54&threadID=751055
http://forum.java.sun.com/thread.jspa?forumID=54&threadID=743429
http://forum.java.sun.com/thread.jspa?forumID=54&threadID=742997&start=11
http://forum.java.sun.com/thread.jspa?forumID=54&threadID=750775&start=24
Just a simple search for this forum....
It took me 10 seconds tofind these..
JJ -
Hi buddies,
I have installed oracleappserver.
i would like to run some ejb samples.
h to do that.i am new for ejb and oracleapserver.
can anyone give me the steps for that.
thanks and regards
sivaHey Siva, Buddy!
How are you? Remind me where we know each other from!
Have you looked through the sample code available for download
from:
http://technet.oracle.com/sample_code/tech/java/oc4j/content.html
There is also documentation available at:
http://technet.oracle.com/docs/tech/java/oc4j/content.html
The documentation also contains sample code.
If you have looked through the above, and are still unclear as to
how to proceed, then please ask specific questions about the
aspects of OC4J that you are unclear on.
Please note also the following site:
http://kb.atlassian.com/content/tutorials/
also contains tutorials explaining how to set up and execute an
EJB application using OC4J.
If you are also new to EJB, go visit
http://www.theserverside.com
They have a digital book (PDF format) available for downloading
about EJB, "Mastering Enterprise Java Beans" by Ed Roman.
Good Luck,
Avi. -
Problem with Oracle9iAS SOAP EJB Sample
I have tried testing the stateless/stateful EJB soap services sample in Oracle9iAS SOAP server.
I have changed the provider.xml. Deployed that and the service.xml and put the sample.jar in the lib directory.
when i run the testit.bat, I get the following error :
Ouch, the call failed:
Fault Code = SOAP-ENV:Server
Fault String = Error in connecting to EJB [java.lang.SecurityException]
Can anyone help me out in this ??
Thanks in advance,
ChhimiChhimi, could you check the providers.xml you are using. Here is mine for a local OC4J:
<deployedProviders>
<isd:provider xmlns:isd="http://xmlns.oracle.com/soap/2001/04/deploy/provider"
id="stateless-ejb-provider"
class="oracle.soap.providers.ejbprov.StatelessEJBProvider">
<isd:option key="ContextProviderURL" value="ormi://localhost:23791" />
<isd:option key="SecurityPrincipal" value="admin" />
<isd:option key="FullContextFactoryName" value="com.evermind.server.rmi.RMIInitialContextFactory" />
<isd:option key="SecurityCredential" value="welcome" />
</isd:provider>
</deployedProviders>
When deploying to Oracle9iAS you will likely have to change the RMI port, hostname and password. For example,
a default 9iAS install has EJB's listening on RMI ports 3101 - 3200. For this to hook up you need to pick a port (e.g. 3102) with the appropriate host and password and it should hang together.
What some people do is change the ports to not be dynamic and set it to a specific port as it is with the OC4J stand-alone instance. You can check out the opmnctl command in the <Oracle9iAS_home>\opmn\bin directory to reload the opmn.xml file located in the <Oracle9iAS_home>\opmn\conf directory to do this or more safely use Enterprise Manager to change the RMI ports for the OC4J instance you are using.
Hope this helps. I have been offline for nearly a week but should be checking again regularly if you have problems.
Mike. -
EJB & ORB problems in 8i (8.1.5)
Hi all,
I'm having problems with the ORB in 8i (solaris 2.6). When
trying to run deployejb or sess_sh the process runs for a couple
minutes then crashes. I assume the ORB is not configured
properly. Is there trouble shooting guide, or can someone post a
list of steps to execute to ensure that 8i and the ORB are
configured properly?
I've spent the last two days reading the doc's, (both the EJB and
Net8 Admin) and it seems I have everything set up.
I've been having problems using netca and it isn't working great,
and the netasst won't launch at all. Is anyone else having
problems with either of these tools?
Its a brand new install of solaris 2.6 and 8i..
Any advice would be appreciated.
Thanks in advance,
Rob
(Sorry this doesn't directly apply to the JDev group, but there
doesn't seem to be an EJB group)
nullRob,
Here's a list from the Oracle JServer FAQ:
Nothing works! Basic installation sanity tests
Some people have hit unusual errors after installation and wasted
large amounts of time chasing down what looks like problems with
their code, only to find that their installation was
somehow broken all along.
If you are getting weird errors, (or this is a fresh
installation!), please spend 5 minutes to try running the
following 3 samples before doing anything else. You will need to
expand
$ORACLE_HOME/javavm/demo/demo.tar and then run:
$ORACLE_HOME/javavm/demo/examples/jsp/helloworld
$ORACLE_HOME/javavm/demo/examples/corba/basic/helloworld
$ORACLE_HOME/javavm/demo/examples/ejb/basic/helloworld
These 3 samples are configured to run for a typical install, and
are supplied with READMEs, Makefiles and should just work. We
verified that they work before we shipped the CDs,
so if they fail, there is a problem with the installation
somewhere.
If these samples work, they verify that the JServer option is
properly installed in your Oracle server instance, that basic
TCPIP connectivity is configured properly, you do have a
working JDK installed and that the basic Java Stored Procedure,
CORBA, and EJB functionality is working within your JServer
installation.
More importantly, if these 3 samples fail to run, then you can be
assured that your own code will not run until you fix the
installation/cofiguration problems and get these 3 samples to
work. This will save you hours of debugging code that is not to
blame!
Rob Truban (guest) wrote:
: Hi all,
: I'm having problems with the ORB in 8i (solaris 2.6). When
: trying to run deployejb or sess_sh the process runs for a
couple
: minutes then crashes. I assume the ORB is not configured
: properly. Is there trouble shooting guide, or can someone post
a
: list of steps to execute to ensure that 8i and the ORB are
: configured properly?
: I've spent the last two days reading the doc's, (both the EJB
and
: Net8 Admin) and it seems I have everything set up.
: I've been having problems using netca and it isn't working
great,
: and the netasst won't launch at all. Is anyone else having
: problems with either of these tools?
: Its a brand new install of solaris 2.6 and 8i..
: Any advice would be appreciated.
: Thanks in advance,
: Rob
: (Sorry this doesn't directly apply to the JDev group, but there
: doesn't seem to be an EJB group)
null -
EJB classpath problem when refering a DAO in library jar file
Hi
When I tried to deploy an EJB jar file in 10g which references the DAO for getting database[SQL Server2000] query results.Its not retriving data nor throwing any exceptions.Other DAO business methods which do not access database are working well.
When I tried to import the DAO inside a JSP and calling the DAO data access method which is working fine. Even I have set the resource-ref [datasource JNDI Name] in ejb-jar.xml files for the EJB beans, but its not referencing. If you have any ideas, how to resolve this problem, please forward me your suggestion.
Thanks in Advance
Best Regards
Venugopal BaluHi
When I tried to deploy an EJB jar file in 10g which references the DAO for getting database[SQL Server2000] query results.Its not retriving data nor throwing any exceptions.Other DAO business methods which do not access database are working well.
When I tried to import the DAO inside a JSP and calling the DAO data access method which is working fine. Even I have set the resource-ref [datasource JNDI Name] in ejb-jar.xml files for the EJB beans, but its not referencing. If you have any ideas, how to resolve this problem, please forward me your suggestion.
Thanks in Advance
Best Regards
Venugopal Balu -
I have a client-server application where my client is an applet and the server is an EJB.
The HTML code to launch the applet is dynamically generated by a JSP page. Now i want this JSP page to be able to communicate with the EJB.
What i need is that the JSP page will pass a parameter to the Applet and the same parameter will be notified to the EJB. So that when the Applet accesses the EJB, the EJB could verify whether the parameter is correct.
Could someone show me a way to achieve this.
I am doing all these bcos since it the applet that acceses the EJB anyone who could manage to get the Applet jar file can access the EJB unauthorizedly,with the help of a decompiler.
If anyone has a better solution to this problem, kindly let me know
regards
RaeesGreetings,
What i need is that the JSP page will pass a parameter
to the Applet and the same parameter will be notified
to the EJB. So that when the Applet accesses the EJB,
the EJB could verify whether the parameter is correct.Unless you're using a database to hold the verification parameter you're looking at several problems here, especially if your EJB is a Session Bean. Firstly, if your bean is Stateful (SB) you will get an exception when your Applet tries to access the bean since Session Beans are not shareable among multiple threads (meaning, in this case, "clients"). If your bean is Stateless it can store the parameter internally, however, Stateless beans are poolable. This means when your Applet tries to verify itself there's no guarantee that the bean holding the parameter from the JSP is the same bean the Applet verifies against. However...
Could someone show me a way to achieve this. One way this can be handled is with a "verification" Stateless SB and a temporary database table. The bean can have a method to generate a temporary "key" which it stores in the temporary table and passes back to the caller (JSP). The JSP then passes this as a parameter to the Applet which invokes a method to validate the key. This method would then check the table for the specified key and delete it upon successful verification. However, since you would be embedding a security construct within the web page it is advisable to perform the page loading over SSL...
I hope this helps.
regards
Raees Regards,
Tony "Vee Schade" Cook -
JSP/EJB compilation: don't put .java files in EJB jars!
I was having trouble compiling a JSP that uses an EJB remote interface.
The Weblogic console printed an error like this:
Thu Aug 31 14:13:58 PDT 2000:<E> <ServletContext-General> Compilation of
D:\weblogic\myserver\classfiles\jsp_servlet\_hl
og.java failed:
D:\weblogic\myserver\tmp_deployments\ejbjar-6787.jar(hlog/ejb/LogEntry.java):5:
class LogEntry
is public, should be declared in a file named LogEntry.java
(source unavailable)
1 error
The fix was not to include source files in my EJB jar. Before I was
using a simple jar command:
>jar -cf hlog.jar hlog META-INF
Which of course included both class and source files in the jar (I
didn't see the harm in this).
I changed to:
>jar -cf hlog.jar hlog\ejb\*.class META-INF
and the problem went away.
Thought this might save y'all some time and grief...
John
In the previous message: "I'd putt String as the return value for all methods"...
all methods = doInserir, doAlterar and doRemover.
public String doInserir() {
this.produtoRemote.inserir(this.produto);
return "sucesso";
public String doAlterar() {
this.produtoRemote.alterar(this.produto);
return "sucesso";
public String doRemover() {
this.produtoRemote.remover(this.produto);
return "sucesso";
}Just to clarify.
Thanks! -
Hi,
I am using following code in jsp.
<%@ page session="true"%>
<%@ page import="java.io.*" %>
<%
String fileName="test.txt";
response.setContentType("application/txt");
response.setHeader("Content-Disposition","attachment; filename="+fileName);
try
PrintWriter fw = response.getWriter();
fw.write("param1");
fw.write(",");
fw.write("param2");
fw.write(",");
fw.write("param3");
fw.write("\r\n");
fw.flush();
fw.close();
catch(Exception e)
%>
<input type=button value="CONTINUE">
The problem is flow does not go to CONTINUE button and it lost the control after response.setHeader("Content-Disposition","attachment; filename="+fileName);
Do you have any idea what is the problem ?
ThanksHi
I am trying to give user option so that he can download a file in his local machine.
As you suggest use out object. I used the out object but i still have the same problem.
After writig in a data.csv file, control does not go to the CONTINUE button.
following is the sample code which i am using.
<html>
<body>
<%
String file="data.csv";
//response.setContentType("application/vnd.ms-excel");
response.setContentType("application/html");
response.setHeader("Content-Disposition","attachment; filename="+file);
try
out.write("Test1");
catch(Exception e)
%>
<div align="right">
<input type=button value="CONTINUE">
</div>
</body>
</html>
do you have any suggestion to fix this problem?
Kind Regards -
I keep getting the following error message when I click login on my sample login page:
Error: 500
Location: /examples/jsp/gcdBB/Login.jsp
Internal Servlet Error:
javax.servlet.ServletException: Syntax error or access violation, message from server: "You have an error in your SQL syntax near '"USERNAME", "PASSWORD") VALUES ('admin','admin')' at line 1"
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at jsp.gcdBB._0002fjsp_0002fgcdBB_0002fLogin_0002ejspLogin_jsp_6._jspService(_0002fjsp_0002fgcdBB_0002fLogin_0002ejspLogin_jsp_6.java:97)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)
Root cause:
java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax near '"USERNAME", "PASSWORD") VALUES ('admin','admin')' at line 1"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1628)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:917)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1806)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1740)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1309)
at jsp.gcdBB._0002fjsp_0002fgcdBB_0002fLogin_0002ejspLogin_jsp_6._jspService(_0002fjsp_0002fgcdBB_0002fLogin_0002ejspLogin_jsp_6.java:87)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)
How can i solve this error?Here is the section of code in question:
<%
Class.forName("org.gjt.mm.mysql.Driver");
java.sql.Connection connection=java.sql.DriverManager.getConnection
("jdbc:mysql://localhost:8080/gcdBB_db");
java.sql.Statement statement = connection.createStatement();
Enumeration parameters = request.getParameterNames();
if(parameters.hasMoreElements())
String usernameValue = request.getParameter("username");
String passwordValue = request.getParameter("password");
statement.executeUpdate("INSERT INTO USERS (\"USERNAME\", \"PASSWORD\") VALUES ('"+usernameValue+"','"+passwordValue+"')");
%>
Any ideas to solving the problem? -
hi
I am trying work with ejb and jsp's using WLS 6.1 but nothing seems to work ,
with out using jsp if i am invoking ejb's by writing a simple client its working
fine
well here is what i have done
i have copied the ejb remote and home interface classes into WEB-INF/classes generated
xml files and created a jar file with extension .war
well now i am invoking jsp by web browser but it gives a compile error package
not found (where all the ejb classes are there)
what should be the class path and should these ejb classes and interfaces be in
c:bea\wlserver6.1\config.....
path or can they be in any other path
please clarify
thanks
hi again
i tried with WEB-INF\classes\ejb1 even now i am getting the same errors
C:\DOCUME~1\ADMINI~1.SPS\LOCALS~1\Temp\jsp_servlet\__ejb1.java:21: package ejb1
does not exist
probably occurred due to an error in /ejb1.jsp line 2:
<%@ page import="javax.naming.*, javax.rmi.*, java.util.*, java.io.*,ejb1.*" %>
C:\DOCUME~1\ADMINI~1.SPS\LOCALS~1\Temp\jsp_servlet\__ejb1.java:108: cannot resolve
symbol
probably occurred due to an error in /ejb1.jsp line 21:
DemoHome dh = (DemoHome)ctx.lookup("DemoEJB");
C:\DOCUME~1\ADMINI~1.SPS\LOCALS~1\Temp\jsp_servlet\__ejb1.java:108: cannot resolve
symbol
probably occurred due to an error in /ejb1.jsp line 21:
DemoHome dh = (DemoHome)ctx.lookup("DemoEJB");
C:\DOCUME~1\ADMINI~1.SPS\LOCALS~1\Temp\jsp_servlet\__ejb1.java:109: cannot resolve
symbol
probably occurred due to an error in /ejb1.jsp line 22:
Demo d = dh.create();
thank you
sri
"sri" <[email protected]> wrote:
>
>hi!!!
>
>thank you,yes i dint give the package structure i will try that out !!!
>
>i need further clarification regarding this please, i removed the package
>name
>and now the classes are in WEB-INF\classes
>i tought it would work when i run jsp. but its giving error cant find
>the remote
>and home interface names...
>
>what would be the problem here the class files are placed in the web-inf
>folder
>why cant jsp find them should we do any thing else
>
>thanks
>sri
>
>
>"Vijay Poluri" <[email protected]> wrote:
>>
>>Hi Sri,
>>
>>Please check if the EJB classes are under the exact package structure
>>as declared
>>in the EJB.
>> WEB-INF/classes/packagestructure
>>FYI, keeping EJB interface classes in the System Classpath is not
>recommended.
>>
>>Vijay
>>Developer Relations Engineer
>>BEA Support
>>
>>
>>"sri" <[email protected]> wrote:
>>>
>>>hi
>>>
>>>
>>>I am trying work with ejb and jsp's using WLS 6.1 but nothing seems
>>to
>>>work ,
>>>
>>>with out using jsp if i am invoking ejb's by writing a simple client
>>>its working
>>>fine
>>>
>>>well here is what i have done
>>>i have copied the ejb remote and home interface classes into WEB-INF/classes
>>>generated
>>>xml files and created a jar file with extension .war
>>>
>>>well now i am invoking jsp by web browser but it gives a compile error
>>>package
>>>not found (where all the ejb classes are there)
>>>
>>>what should be the class path and should these ejb classes and interfaces
>>>be in
>>>c:bea\wlserver6.1\config.....
>>>path or can they be in any other path
>>>
>>>please clarify
>>>
>>>thanks
>>>
>>>
>>>
>>>
>>
>
-
Hi,
I'm working on a project but it doens't work perfectly.
It use J2EE, EJB and JSP technology but I'm fresh in this field.
At the moment, sometimes (but not for each utilisation and I don't unterdstand why !) there is a Servlet exception which is :
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot create bean of class util.DocumentationServicesBean
Root Cause:
java.lang.ClassNotFoundException: class util.DocumentationServicesBean : java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Client not authorized for this invocation.
at java.beans.Beans.instantiate(Beans.java:211)
... ... ...If someone know the reason of this problem, please let me know.
Thanks !it's not a servlet exception but when ur jsp/servlet is trying to invoke the EJBs, by any means, like creating a new instance, or just getting the pre-existed data by some finder method etc. etc., some times it doesn't have sufficient rights to do that call. Then ur ejb server throws an error, which ultimately comes to the webserver in the form of ServletException.
java.rmi.RemoteException: Client not authorized for this invocation.
at java.beans.Beans.instantiate(Beans.java:211)check ur deployment descriptor for the different roles and their rights, and different methods and permissions for them.
good luck,
Maybe you are looking for
-
How to run a SQL based query against a specific collection
Hello, I have used this query to make a custom reports, it works but all machines are mixed up, So I am looking for a way to run it against collection group win 8 or win 8.1. or if I can add a line to this query so it will also display OS version. SE
-
I recently recorded a live album, and used my own mic's on stage. Recorded 7 separate tracks, threw them into Logic Pro and began mixing... A problem I ran into is that the two tracks that got 1.) a PA speaker, and 2.) the overall stage. On both trac
-
Can I be connected to two networks at the same time?
Hi there I have an imac desktop with 10.5.8 running. I have a wireless network with my timecapsule and a printer connected to it. We have two mac computers in the house that print wirelessly via this network. I also have the internet coming in via a
-
Wondering if anyone else has come across this issue....I must of hit an awful evil key because for the third time deep into an edit I traced back to my intro to find most of the audio pulled a Houdini on me and disappeared. I've been through a tough
-
Hi, Is there any user-exit for ME21N, thru which the below 3 values can be changed? Goods-Receipt (EKPO-WEPOS) Inv.Receipt (EKPO-REPOS) GR-Based IV (EKPO-WEBRE) Any pointers on this would be appreciated. Thanks in advance. Rgds, Bhargav.