Tomcat servlets & EJB's in 8i JVM
Has anybody successfully deployed a servlet / JSP on Tomcat which communicates with and EJB in JServer?
I keep getting a javax.naming.NoInitialContextException, but when I explicitly set the INITIAL_CONTEXT_FACTORY, I get IllegalArgumentException.
Oracle's official response to this is not to use Tomcat, but to use mod_ose and the OSE in 8.1.7 (though I've had very little success with this either), but I'd like to be able to use any compliant servlet engine, not just Oracle.
null
I suggest you start looking at the J2EE tutorial and the sample applications. Both the tutorial and the sample applications included with the J2EE SDK will help you write a J2EE application that utilizes both a web component and an EJB component. The tutorial also contains useful information concerning the deploytool. If this doesn't help feel free to post again and include as much detail as possible, including error messages and log file contents.
Similar Messages
-
Compiled Tomcat Servlet Example & got JAR, not WAR?
Is there a basic reference on how to create a simple servlet with NetBeans 4.1 and deploy it to Tomcat?
When I created the project I chose Samples->Web->Tomcat Servlet Example, and yet it does not create a WAR file on compilation.
And of course once I'm past that I have to figure out how to edit the XML file, I gather.
I need a reference that will hold me by the hand and walk me through it once to kick start me.
After that I think I can make it without having to ask such newbie questions.Hi,
not sure to what extent you are clear in build.xml file (done thru ant).
what i can tell you is, ant creates any archive file (be it .jar, .war, .ear) with the tasks named "jar" (<jar jarfile="yourfilename.jar"..>), "war" and "ear". But both war and ear are the extensions of the jar only.
You can achieve creation of any archive file with the jar task itself.
you need to take care of the following...
(1) you can /should edit the extension of the files at every stage.. first .jar and then .war and then .ear (if necessary) => basic flow
(2) at every step, you have to have a file inclusion inside the corresponding archive file..
say for example, for a .jar file you should include all the compiled .class files, and ejb-jar.xml (incase you use ejbs) and other built-in jar files....
In case of .war files (web archive) you should include the web.xml file, any static files (html, jsp etc), any tld files - it goes with your application's nature and requirement.....
fyi, i m including a sample build.xml file which i use for a webapplication, so it deals with war...
<?xml version="1.0" encoding="UTF-8"?>
<project name="ServletsReqDispFwd" default="deploy">
<property name="top" value="."/>
<property name="webinf" value="${top}/WEB-INF"/>
<property name="lib" value="${webinf}/lib"></property>
<property name="classes" value="WEB-INF/classes"/>
<property name="jboss.dir" value="D:\jboss-3.2.2RC3\server\default\deploy"></property>
<property name="tomcat.dir" value="D:\jakarta-tomcat-4.1.27\webapps"></property>
<property name="warfile" value="ServletsReqDispFwd.war"></property>
<property name="src" value="${top}/src"/>
<property name="web.xml" value="WEB-INF/web.xml"/>
<target name="package">
<javac srcdir="${src}" destdir="${classes}"
listfiles="true" debug="true" verbose="true"
classpath="${lib}/*.jar"/>
<war warfile="${warfile}" webxml="${web.xml}">
<webinf dir="${top}">
<include name="**/*web*.xml"/>
<include name="**/*application*.xml"/>
<exclude name="src/**/*.xml"/>
</webinf>
<lib dir="${lib}">
<include name="*.jar"/>
</lib>
<fileset dir="." includes="**/*.html"/>
<classes dir="${classes}" includes="**/*.class"></classes>
</war>
</target>
<target name="deploy" depends="clean,package">
<copy file="${warfile}" todir="${tomcat.dir}" overwrite="true"></copy>
</target>
<target name="clean">
<delete dir="${classes}">
<filename name="*.class"/>
</delete>
<delete>
<fileset dir="${top}" includes="${warfile}"/>
</delete>
<delete>
<fileset dir="${tomcat.dir}" includes="${warfile}"/>
</delete>
</target>
</project>hope this contribues to a certain extent to help you edit the buildfile (xml file as you go) to meet your requirement..... -
Problem configuring TassieDB database to work with JBoss Servlets + EJB app
Hi everybody
I have been unable to get Budi Kurniawan's Tassie Onine Bookstore example (
http://benmira.free.fr/en/j2ee/sessionEJB.htm#ch29lev1sec4) application to read anything from the database TassieDB . I am not sure what is wrong. I downloaded the database from the CD. Then since this was an older version of Access, I had to let my Access convert it to the newer form.
I then configured the Database the way I thought I should in order for it to work. I created a Data Source Name called TassieDB, by following the procedure to create a System DSN on Windows. I selected the Microsoft Access Driver and associated my Database which I named TassieDB1, which I deposited under C:\budibookstore which also contains the package com.brainysoftware.tassie.servlet.ejb
When I access the SearchServlet page and type in "Computer" in the search box nothing turns up. I wonder what is going on?
The following errors are spewed out by Apache in this process:
May 18, 2005 8:27:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
May 18, 2005 8:27:28 PM org.apache.struts.util.PropertyMessageResources
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
e
May 18, 2005 8:27:28 PM org.apache.struts.util.PropertyMessageResources
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
l=true
May 18, 2005 8:27:29 PM org.apache.struts.util.PropertyMessageResources
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
nNull=true
May 18, 2005 8:27:33 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 18, 2005 8:27:33 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
May 18, 2005 8:27:33 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=10/150 config=C:\tomcatj\conf\jk2.properties
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
rg.jnp.interfaces.NamingContextFactory]
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
rg.jnp.interfaces.NamingContextFactory]
All help is gratefully acknowledged and accepted. Thanks in advanceHi
Did you notyfy the Exception ?
class not found Exception "org.jnp.interfaces.NamingContextFactory"
add these packages to your class path.
Vinoth -
Servlets/JDBC vs. servlets/EJB performance comparison/benchmark
I have a PHB who believes that EJB has no ___performance___ benefit
against straightforward servlets/JSP/JDBC. Personally, I believe that
using EJB is more scalable instead of using servlets/JDBC with
connection pooling.
However, I am at a lost on how to prove it. There is all the theory, but
I would appreciate it if anyone has benchmarks or comparison of
servlets/JSP/JDBC and servlets/JSP/EJB performance, assuming that they
were tasked to do the same thing ( e.g. performance the same SQL
statement, on the same set of tables, etc. ).
Or some guide on how to setup such a benchmark and prove it internally.
In other words, the PHB needs numbers, showing performance and
scalability. In particular, I would like this to be in WLS 6.0.
Any help appreciated.First off, whether you use servlets + JDBC or servlets + EJB, you'll
most likely spend much of your time in the database.
I would strongly suggest that you avoid the servlets + JDBC
architecture. If you want to do straight JDBC code, then it's
preferable to use a stateless session EJB between the presentation layer
and the persistence layer.
So, you should definitely consider an architecture where you have:
servlets/jsp --> stateless session ejb --> JDBC code
Your servlet / jsp layer handles presentation.
The stateless session EJB layer abstracts the persistence layer and
handles transaction demarcation.
Modularity is important here. There's no reason that your presentation
layer should be concerned with your persistence logic. Your application
might be re-used or later enhanced with an Entity EJB, or JCA Connector,
or a JMS queue providing the persistence layer.
Also, you will usually have web or graphic designers who are modifying
the web pages. Generally, they should not be exposed to transactions
and jdbc code.
We optimize the RMI calls so they are just local method calls. The
stateless session ejb instances are pooled. You won't see much if any
performance overhead.
-- Rob
jms wrote:
>
I have a PHB who believes that EJB has no ___performance___ benefit
against straightforward servlets/JSP/JDBC. Personally, I believe that
using EJB is more scalable instead of using servlets/JDBC with
connection pooling.
However, I am at a lost on how to prove it. There is all the theory, but
I would appreciate it if anyone has benchmarks or comparison of
servlets/JSP/JDBC and servlets/JSP/EJB performance, assuming that they
were tasked to do the same thing ( e.g. performance the same SQL
statement, on the same set of tables, etc. ).
Or some guide on how to setup such a benchmark and prove it internally.
In other words, the PHB needs numbers, showing performance and
scalability. In particular, I would like this to be in WLS 6.0.
Any help appreciated.--
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com -
Tomcat servlet respond with "302 Moved Temporarily" to HTTP GET requests
I started Tomcat (4.1.31) on a Unix machine (SunOS 5.8)
I tested the tomcat servlet using the following commands:
telnet 0 80
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
GET /index.html HTTP/1.0
HTTP/1.1 302 Moved Temporarily
Location: http://localhost/
Content-Length: 0
Date: Mon, 17 Oct 2005 18:09:15 GMT
Server: Apache-Coyote/1.1
Connection: close
Any other servlet that I test responses with the same result
Tomcat version 4.1.31
SDK build 1.3.1_02-b02
Solaris SunOS 5.8"302 Moved Temporarily" is a web server error (I googled it - see e.g. http://www.checkupdown.com/status/E302.html)
Two recommendations that you can try:
- do not use 'localhost' - use computer assigned name, or at worst IP address
- in my system, Server URL is set to http://ecm-base:16200/cs/idcplg (from ODC). Try to modify yours accordingly. -
Tomcat Servlet - TCP Port Already in Use?
My problem is that tomcat/servlet is not releasing its TCP port after my servlet closes the port. Next time a servlet tries to use the port it gets an error "Port already in use". Using netstat I can see the port is still in use. If I stop tomcat and restart it, the port is released. I have not had this sort of problem writing C programs that use sockets.
My setup is Fedora Core 6 with JDK1.5_14 and Tomcat 5.5.26. I know it's not the latest, but sockets and streams have been around for a long time.
Actual implementation uses a trivial javaserver page to instantiate a class to create/accept connection from a client (JApplet). After connection, it starts a thread to receive data. I am using ServerSocket(), InputStreamReader(), and OutputStreamWriter(). On ServerSocket I set ReuseAddress to true.
I have try/catch on all my I/O and use tomcat context log for error and OK messages. Data transfer is perfect. Detect close by client works. In the context log I see close of streams and ServerSocket occur with no exceptions. Then, I manually close the jsp window. No indication of any problems. If I use different port 2nd time (e.g. 50001) it all works perfect. If I use my default (50000) again, servlet gets an error during bind, "Port already in use".
2.5 years with Java. 5 years with Linux and C.
Please advise or referrwengr wrote:
My problem is that tomcat/servlet is not releasing its TCP port after my servlet closes the port. Next time a servlet tries to use the port it gets an error "Port already in use". Using netstat I can see the port is still in use. If I stop tomcat and restart it, the port is released. I have not had this sort of problem writing C programs that use sockets.Nice.... Not sure that matters though.
>
My setup is Fedora Core 6 with JDK1.5_14 and Tomcat 5.5.26. I know it's not the latest, but sockets and streams have been around for a long time.
Actual implementation uses a trivial javaserver page to instantiate a class to create/accept connection from a client (JApplet). Bleah! Don't use a JSP for that. Use a servlet at worst. At best use a Servlet to start some other socket manager class which you can/have tested outside the Servlet Container environment.
After connection, it starts a thread to receive data. I am using ServerSocket(), InputStreamReader(), and OutputStreamWriter(). On ServerSocket I set ReuseAddress to true.
I have try/catch on all my I/O and use tomcat context log for error and OK messages. Data transfer is perfect. Detect close by client works. In the context log I see close of streams and ServerSocket occur with no exceptions. Then, I manually close the jsp window. Closing the browser window has no affect on the server.
No indication of any problems. If I use different port 2nd time (e.g. 50001) it all works perfect. If I use my default (50000) again, servlet gets an error during bind, "Port already in use".
2.5 years with Java. 5 years with Linux and C.
Please advise or referShow some code. If you just want some generic advice it would be to close the port, as soon as you don't need it anymore. But you know that. Without any further code I think that is about all that can be said.
P.S. Make the code as small as possible, compilable, but still demonstrating the problem. Also see: [this tutorial as an example...|http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets.html?page=1] -
Hi Friends,
I am using Oracle Application Server 10g (10.1.2.0.2) on windows
I have the Vulnerability: Apache Tomcat servlet/JSP container default files.
and the fix is Review the files and delete those that are not needed.
i would like to know the location of the files to review and delete.Please suggest?
Regards,
DBApache/Tomcat is not related to OAS, where did you get this info? OAS is based in a Orion Web Server and Apache HTTP Server, not Tomcat.
For this kind of problems there are the CPU you may want to check in Metalink for them.
Can you clarify also what default files?
Greetings. -
CiscoWorks Tomcat Servlet Engine service does not start
Hello!
CiscoWorks Tomcat Servlet Engine service does not start.
Events in the Windows Event Viewer:
The CiscoWorks Tomcat Servlet Engine service terminated unexpectedly. It has done this 1 time(s).
output pdshow and file stderr.log, hs_err_pid2128.log attached.
Do you have an idea how to resolve this?
Thanks!The only things which I see are wrong are the start types for the IPM NG database engine and HUM database engine services. They must be set to Manual, not Automatic. However, that would not account for the Tomcat crash. The crash points to an error in the code which processes regdaemon.xml, but I see no reason why that should be failing. As I said before, I think it would be best to open a Service Request. Remote access would be helpful to dig into this problem in more detail.
Please support CSC Helps Haiti
https://supportforums.cisco.com/docs/DOC-8895
https://supportforums.cisco.com -
Best practice for Servlet EJB integration
I'm wondering what the best practice is for Servlet EJB integration in terms of
caching the home and remote objects. My understanding is that the Home object
is threadsafe and could therefore be cached as an attribute of the Servlet. This
would remove the need for a JNDI lookup for each request. Similarly caching the
ProxyObject would yield further savings. However, I have noticed that most examples
don't use either of these practices. Why not?
Thanks in advance,
Geordie
This has been answered repeatedly. WL allows you to cache JNDI context
objects, ejb homes and remotes without any problems. (EJB remote interfaces
must only be used by one thread at a time, but that requirement is provided
by the EJB spec itself.)
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Geordie" <[email protected]> wrote in message
news:3af9579f$[email protected]..
>
> I'm wondering what the best practice is for Servlet EJB integration in
terms of
> caching the home and remote objects. My understanding is that the Home
object
> is threadsafe and could therefore be cached as an attribute of the
Servlet. This
> would remove the need for a JNDI lookup for each request. Similarly
caching the
> ProxyObject would yield further savings. However, I have noticed that
most examples
> don't use either of these practices. Why not?
>
> Thanks in advance,
> Geordie
-
Should I install Apache Web server to use Jakarta Tomcat Servlet engine?
Hello,
I have some problems and now have a question:
Should I install Apache Web server to use Jakarta Tomcat Servlet engine?
JTK home page is available via http://localhost:8080
Tomcat ver 3.1.3
Thanks.No, you don't need to run Apache webserver (httpd) to run Tomcat. Tomcat by default runs on port 8080, but you can set it to any port, including 80, if you have permission to do so (on *nix systems, you need root permissions to run services on any port below 1024).
Tomcat is a webserver as well, just one that includes a servlet container and JSP processor. So it will serve your html files, images, etc (aka static content), just as well as Apache httpd, in addition to being able to run servlets and JSPs.
Apache httpd has more options for serving static content than Tomcat, so many people prefer to use it as their main webserver and only use Tomcat as a sort of "plugin" to handle servlets and JSPs. This can be achieved through a connector. Instructions on how to set this up are on the Jakarta website.
So you could use Apache and Tomcat combined, next to each other, or totally separated. In many cases, just Tomcat will do. -
Hi,
What is that you are trying to accomplish ? Is it deployment or
trying to develop applications ? Are you getting any errors ? If so,
please post them to help you. I think the documentation is the best place
for you to begin with.
Regards & Happy New Year
Raj
Arif Khan wrote:
New To Iplanet app server.Can some one help me getting started by
delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with
iplanet docs..didnt quite get it. thanx
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
Is each servlet created in a separate JVM
Hi,
I am wondering if each servlet runs in a separate JVM?
Does this depend on the servlet container we use?
Thanks guysNo. One server runs in one JVM.
All servlets run by that server run in the same JVM.
You can have multiple instances of the server running of course, each would be in its own JVM and require its own resources. -
Best way to see changes done to jsps/servlets/ejb/xmls in EAR
I am using iPlanet app server with iPlanet web server. Everytime i make any change jsp/servlet/ejb i have to redeploy whole ear application again. This takes a long time. Even when i use the "iasdeploy redployapp " command to deploy, it takes same amount of time as it takes for the orignal deployment.
So Is there any way to decrease the amount of the time it needs for me to re-deploy the applications when slight changes are made to application. I would really be thankful to anybody who can help me.Hi,
I am facing this problem with a simple EAR file also. It does not contain any EJBs.
It has just JSPs, XML, and JAVA Classes.
The file size is about 481Kb.
Earlier this used to get deployed using the "iasdeploy" command within 1 minute.
Now it is taking more than 5 minutes to deploy the EAR file.
I am using the following command :
iasdeploy deployapp -verbose XYZ.ear
The same holds true for the "iasdeploy removeapp -verbose XYZ.ear" also.
Please help.
Thanks,
Samar -
Hi,
I have Oracle 9i installed. It comes bundled with Apache web server minus documentation. Can I deploy Servlets/ EJBs. on this. Where can i get hold of documentation.
ArunAre you using the SunONE portal server in your architecture? If your question is related to the Application server, you would find a greater chance of obtaining a solution through the web/app server forum.
-
Why so happen when tomcat call ejb from weblogic6.1?
Hi everyone,
I've developed a stataless session bean and deployed to weblogic6.1,then
converted the ejb into a web service and deployed to axis hosting
Tomcat4.1.when I developed a web service client to call the web service,but
errors displayed as follows:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultSubcode:
faultString: javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal ʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ]
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal ʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
at javax.security.auth.Subject$SecureSet.add(Subject.java:1071)
at
weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootService
sStub.java:72)
at
weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java
:80)
at weblogic.security.acl.internal.Security.authenticate(Security.java:108)
at
weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFacto
ryDelegate.java:509)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
toryDelegate.java:364)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:336)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:208)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:149)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at
org.apache.axis.providers.java.EJBProvider.getContext(EJBProvider.java:349)
at
org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:314)
at
org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.
java:127)
at
org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider
.java:206)
at
org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.ja
va:144)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:258)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)
javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal ʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ]
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
49)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
8)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:973)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:230)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2511)
at org.apache.axis.client.Call.invoke(Call.java:2481)
at org.apache.axis.client.Call.invoke(Call.java:2176)
at org.apache.axis.client.Call.invoke(Call.java:2099)
at org.apache.axis.client.Call.invoke(Call.java:1622)
at wsclient.common.DynamicInvoker.invokeMethod(DynamicInvoker.java:177)
at wsclient.common.DynamicInvoker.main(DynamicInvoker.java:79)
Exception in thread "main"
anyone may help me,thank you in advance!
Regards peeroHello,
I know the reason of the problem,that is the conflict from different
version of jdk.As we know weblogic6.1 run using jdk1.3.1.If I run tomcat
using jdk1.3.1,it work fine.But if change it jdk1.4.1,the error is always
same.
Anyway thank you!
then can you tell me if weblogic6.1 can run using jdk1.4.1? If true,how to
do?
Regards,
Peero
"Bruce Stephens" <[email protected]> wrote in message
news:[email protected]...
Hello,
Your WSDL looks fine, so this should not be your issue. I'd suggest
that you focus on the security framework.
Not much help,
Bruce
peero wrote:
Hello Bruce,
Thank you! the content of wsdl file list as follows:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/Greeting"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/axis/services/Greeting"
xmlns:intf="http://localhost:8080/axis/services/Greeting"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:message name="greetingRequest">
<wsdl:part name="in0" type="xsd:string" />
</wsdl:message>
- <wsdl:message name="greetingResponse">
<wsdl:part name="greetingReturn" type="xsd:string" />
</wsdl:message>
- <wsdl:portType name="Greeting">
- <wsdl:operation name="greeting" parameterOrder="in0">
<wsdl:input message="impl:greetingRequest" name="greetingRequest" />
<wsdl:output message="impl:greetingResponse" name="greetingResponse"
/>
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="GreetingSoapBinding" type="impl:Greeting">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="greeting">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="greetingRequest">
<wsdlsoap:bodyencodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/Greeting" use="encoded"
/>
</wsdl:input>
- <wsdl:output name="greetingResponse">
<wsdlsoap:bodyencodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/Greeting" use="encoded"
/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="GreetingService">
- <wsdl:port binding="impl:GreetingSoapBinding" name="Greeting">
<wsdlsoap:addresslocation="http://localhost:8080/axis/services/Greeting"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Regards,
Peero
"Bruce Stephens" <[email protected]> wrote in message
news:[email protected]...
Hello,
This is a curious stack trace and on the surface it looks like a
security issue. I'm not sure we can help you solve the axis problem,
but I would like to know from an interop perspective. Could you post
the wsdl for the service you are trying to call?
Thanks,
Bruce
peero wrote:
Hi everyone,
I've developed a stataless session bean and deployed to
weblogic6.1,then
converted the ejb into a web service and deployed to axis hosting
Tomcat4.1.when I developed a web service client to call the webservice,but
errors displayed as follows:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultSubcode:
faultString: javax.naming.AuthenticationException [Root exception
is> > > > java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.Principal> > ʵÀýµÄ¶ÔÏó> > > > Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.PrincipalʵÀýµÄ¶ÔÏó
Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
at javax.security.auth.Subject$SecureSet.add(Subject.java:1071)
at
weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootService
sStub.java:72)
at
weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java
:80)
atweblogic.security.acl.internal.Security.authenticate(Security.java:108)
at
weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFacto
ryDelegate.java:509)
at
weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFac
toryDelegate.java:364)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:336)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:208)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:149)
atjavax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
atjavax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at
javax.naming.InitialContext.<init>(InitialContext.java:195)
>>>>
at
org.apache.axis.providers.java.EJBProvider.getContext(EJBProvider.java:349)
>>>>
at
org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:314)
>>>>
at
org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.
java:127)
at
org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider
.java:206)
at
org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.ja
va:144)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:258)
>>>>
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
atorg.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
atorg.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
>>>>
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>>>
atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
atorg.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
>>>>
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
>>>>
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
at java.lang.Thread.run(Thread.java:536)
javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: ÊÔͼ½«Ò»¸ö·Ç java.security.PrincipalʵÀýµÄ¶ÔÏó> > > > Ìí¼ÓÖÁÖ÷ÌâµÄ Principal ¼¯ÖÐ
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
49)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16
8)
at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:973)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(UnknownSource)
atorg.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(UnknownSource)
>>>>
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:230)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2511)
at org.apache.axis.client.Call.invoke(Call.java:2481)
at org.apache.axis.client.Call.invoke(Call.java:2176)
at org.apache.axis.client.Call.invoke(Call.java:2099)
at org.apache.axis.client.Call.invoke(Call.java:1622)
atwsclient.common.DynamicInvoker.invokeMethod(DynamicInvoker.java:177)
>>>>
at wsclient.common.DynamicInvoker.main(DynamicInvoker.java:79)
Exception in thread "main"
anyone may help me,thank you in advance!
Regards peero
Maybe you are looking for
-
Paid $60 - for a phone number rather than a subscr...
Hi, first a quick rant: I'm an EXTREMELY frustrated new user. I have spent the last hour trying to figure out what I just purchased and what I can do to get an explaination, but whoever created this website did so without a new user in mind. Quickly:
-
I will be studying for a year in Japan. I want to buy and bring an iPad. Any advice on which one? If I want cellular service which carrier is likely to be most useful in terms of compatibility or do none work? Thank you
-
Can't add Window setting to new topic
I am working on a WinHelp project created long ago (in version 6 or earlier--the first time through the numbers), and I'm now using version 8 (in the newer numbers) on Windows 7. I created a new topic and on the Advanced tab, I selected a Window (the
-
Why does SQL Developer insist on opening up the package header?
When expanding a package (clicking the '+') SQL Developer keeps opening up the package header (at least the first time you click it). I'm very rarely interested in viewing the header and it's annoying to have all those tabs open.
-
My app world doesn't run on my BB Curve 9220. HELP!
My app world doesn't run on my BB Curve 9220, how can I fix this? I want to bridge my smartphone to my playbook, guess what? I can't! I can't download blackberry bridge 'cause I can't access my app world, it says here that "there is an issue with Bla