Solved

SSL with Tomcat 5 and apache axis

Posted on 2004-08-27
18
738 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
by zero exception 10 83
Is Applet the way to go for my drag and drop system? 8 51
Code Coverage and Coding Standards 2 82
IntelliJ and Eclipse Neon 2 installations 4 69
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.
Suggested Courses

752 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