Solved

SSL with Tomcat 5 and apache axis

Posted on 2004-08-27
18
730 Views
Last Modified: 2013-11-24

Hi,

Im trying to configure tomcat to use SSL and I've followed the steps in the how-to guide and i cant get it to work.  I changed the server.xml to allow for SSL using the following

<Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8443" minProcessors="5" maxProcessors="75"
               enableLookups="true" acceptCount="10" debug="0"
                     scheme="https" secure="true">
      <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
               keystoreFile="c:\jakarta-tomcat-5.0.27\webapps\WSOverSSL\axis\server.keystore"
               keystorePass="changeit"
               clientAuth="false" protocol="TLS"/>
    </Connector>

But tomcat wont start when I put in the Factory element. I had initally used tomcat-jwsdp-1.4, would this have over riden anything or something. If anyone can help would much appricate it!

Thanks,
Suzy
0
Comment
Question by:fyness
  • 8
  • 6
  • 3
18 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 11911725
what exception do you get?
0
 

Author Comment

by:fyness
ID: 11911794


when tomcat doesnt start im not getting an exception that i can see, its not in the logs. if i take the factory element out its still doesnt run. I get the following when i run startup.bat

C:\jakarta-tomcat-5.0.27\bin>startup.bat
Using CATALINA_BASE:   C:\jakarta-tomcat-5.0.27
Using CATALINA_HOME:   C:\jakarta-tomcat-5.0.27
Using CATALINA_TMPDIR: C:\jakarta-tomcat-5.0.27\temp
Using JAVA_HOME:       C:\j2sdk1.4.2_02
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11911836
What does it display if you type:

catalina.bat start

instead of startup.bat

?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 35

Expert Comment

by:TimYates
ID: 11911861
Sory, I meant:

catalina.bat run
0
 

Author Comment

by:fyness
ID: 11911938
its not finding the

Catalina.start using conf/server.xml: java.lang.ClassNotFoundException: org.apac
he.catalina.connector.http.HttpConnector
java.lang.ClassNotFoundException: org.apache.catalina.connector.http.HttpConnector

i took it out be still doesnt work.
0
 

Author Comment

by:fyness
ID: 11911967
when i take the two classnames out i get the following error

SEVERE: Null component Catalina:type=protocolHandler,className=null
27-Aug-2004 13:13:18 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  Protocol handler start failed: java.lang.NullPointerExcept
on
        at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java
1529)
        at org.apache.catalina.core.StandardService.start(StandardService.java:
89)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:23
3)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
27-Aug-2004 13:13:18 org.apache.catalina.startup.Catalina start
INFO: Server startup in 6516 ms
0
 
LVL 35

Expert Comment

by:girionis
ID: 11912071
Where did you install Tomcat? Does the path contain any special characters (space, "+", "-" etc)?
0
 

Author Comment

by:fyness
ID: 11912667
its in stalled in jakarka-tomcat-5.0.27 on my c drive, the path is just jakarka-tomcat-5.0.27/bin
0
 
LVL 35

Expert Comment

by:girionis
ID: 11912728
Did you try to run it before you installed the SSL? It might be that there was a problem with the installation. You might need to reinstall Tomcat.
0
 

Author Comment

by:fyness
ID: 11912758
works fine without the ssl connection been opened i.e. removing the tags from the server.xml
0
 
LVL 35

Expert Comment

by:girionis
ID: 11913017
Can you check Tomcat's jar files to see in which jar file the HttpConnector is? And also can you tell us the location of this class?
0
 

Author Comment

by:fyness
ID: 11914231
I cant find the jar's actually im having trouble getting my localhost page up now. Im also getting this error

Catalina.start using conf/server.xml: java.lang.ClassNotFoundException: org.apac
he.tomcat.service.PoolTcpConnector
java.lang.ClassNotFoundException: org.apache.tomcat.service.PoolTcpConnector
        at org.apache.commons.digester.Digester.createSAXException(Digester.java
:2540)
        at org.apache.commons.digester.Digester.createSAXException(Digester.java
:2566)
        at org.apache.commons.digester.Digester.startElement(Digester.java:1276)

        at org.apache.catalina.util.CatalinaDigester.startElement(CatalinaDigest
er.java:65)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1548)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:489)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:548)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
27-Aug-2004 16:25:03 org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
Caused by: java.lang.NullPointerException
        at org.apache.catalina.startup.Catalina.await(Catalina.java:619)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:579)
        ... 6 more

ANy ideas what the problem may be?

thanks
sue
0
 
LVL 35

Expert Comment

by:girionis
ID: 11914318
Is that when you are running Tomcat or when you try to access your page?
0
 

Author Comment

by:fyness
ID: 11914364
when i start up i think, i just tried starting up again and its not working and getting the same error as above
0
 
LVL 35

Accepted Solution

by:
girionis earned 125 total points
ID: 11914485
I would say reinstall it.
0
 
LVL 35

Expert Comment

by:girionis
ID: 12256658
I believe that a re-installation of Tomcat would have solved the problem.
0
 

Author Comment

by:fyness
ID: 12256817
I had to export classpaths in bashrc to get it working

You can have the points though

THanks for you help
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now