Solved

SSL with Tomcat 5 and apache axis

Posted on 2004-08-27
18
721 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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mergeTwo  challenge 13 72
bitbucket vs gitbucket 3 32
micro services vs rest web services 16 48
maven project error 5 21
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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
The viewer will learn how to implement Singleton Design Pattern in Java.

706 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

16 Experts available now in Live!

Get 1:1 Help Now