Results 1 to 7 of 7

Thread: running dm server on Mac OS X

  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Default running dm server on Mac OS X

    I had some trouble getting dm server 1.0.0 to run on Mac OS X 1.5.5 with java 1.5.

    Caused by: LifecycleException: Protocol handler initialization failed: java.lang.Exception: No Certificate file specified or invalid file format

    Here's the info from the servletContainer.confg (it's stock as well as the keystore)

    {
    /*
    * HTTPS Connector.
    * Documentation at forums won't let me post the url
    */
    "enabled": true,
    "port": 8443,
    "protocol": "HTTP/1.1",
    "scheme": "https",
    "connectionTimeout": 20000,
    "maxThreads": 150,
    "emptySessionPath": false,
    "clientAuth": false,
    "keystoreFile": "keystore",
    "keystorePass": "changeit",
    "secure": true,
    "SSLEnabled": true,
    "sslProtocol": "TLS"
    },

    When I switched to java 1.6 all was well.

    Any ideas why this won't work in java 1.5. It seems more a tomcat issue than dm server but maybe someone here knows the answer.

    Thanks,

    Ted

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    This should certainly work: we all use Mac OS X 10.5 on our development machines.

    Could you please post some more information: ideally the full stack trace of the failure and the full version of Java which you're using.
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Nov 2008
    Posts
    2

    Default

    Hi,

    Here's more information about my environment. Also, I've included a dump file from the dm server.

    java -version
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
    Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.osgi.service.exporter.support .OsgiServiceFactoryBean#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'servletContainer' defined in URL [bundleentry://80/META-INF/spring/servlet-tomcat-context.xml]: Invocation of init method failed; nested exception is com.springsource.server.servlet.core.ServletContai nerException: Failed to start the TomcatServletContainer
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1337)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:423)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:729)
    at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.completeRefres h(AbstractDelegatedExecutionApplicationContext.jav a:276)
    at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor$CompleteRefreshTask.run(DependencyWaiterApp licationContextExecutor.java:145)
    at com.springsource.server.kernel.dm.ContextPropagati ngTaskExecutor$2.run(ContextPropagatingTaskExecuto r.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:613)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'servletContainer' defined in URL [bundleentry://80/META-INF/spring/servlet-tomcat-context.xml]: Invocation of init method failed; nested exception is com.springsource.server.servlet.core.ServletContai nerException: Failed to start the TomcatServletContainer
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1337)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.osgi.service.exporter.support. OsgiServiceFactoryBean.afterPropertiesSet(OsgiServ iceFactoryBean.java:236)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1368)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
    ... 17 more
    Caused by: com.springsource.server.servlet.core.ServletContai nerException: Failed to start the TomcatServletContainer
    at com.springsource.server.servlet.tomcat.TomcatServl etContainer.start(TomcatServletContainer.java:713)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeCustomInitMethod( AbstractAutowireCapableBeanFactory.java:1413)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1374)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
    ... 29 more
    Caused by: LifecycleException: Protocol handler initialization failed: java.lang.Exception: No Certificate file specified or invalid file format
    at org.apache.catalina.connector.Connector.initialize (Connector.java:1060)
    at org.apache.catalina.startup.Embedded.start(Embedde d.java:830)
    at com.springsource.server.servlet.tomcat.TomcatServl etContainer.start(TomcatServletContainer.java:704)
    ... 36 more
    Attached Files Attached Files

  4. #4
    Join Date
    Oct 2008
    Posts
    493

    Default

    Thanks for the info.

    I've just double-checked this on my development machine that's running 10.5.5 and the exact same version of Java 5. The server starts without problems.

    As this works fine for you with a Java 6 VM my suspicion is that the problem is being caused by your version of Java 5. Is your Java 5 installation stock, too? Or have to done anything to customise it, particularly its SSL support?
    Andy Wilkinson
    SpringSource

  5. #5
    Join Date
    Mar 2007
    Posts
    23

    Default

    I'm experiencing the same problem. I'm using OS X 10.5.6. Tried with Java 5 and Java 1.6 with no luck. I just happen to "make install" openssl and APR (for tomcat native), don't know if they're related with this.

    Code:
    [2009-01-22 22:45:07.384] main                     <SPKB0001I> Server starting.
    [2009-01-22 22:45:08.033] main                     <SPOF0001I> OSGi telnet console available on port 2401.
    [2009-01-22 22:45:09.950] main                     <SPKE0000I> Boot subsystems installed.
    [2009-01-22 22:45:10.869] main                     <SPKE0001I> Base subsystems installed.
    [2009-01-22 22:45:12.223] server-dm-6              <SPPM0000I> Installing profile 'web'.
    [2009-01-22 22:45:13.083] server-dm-6              <SPPM0001I> Installed profile 'web'.
    [2009-01-22 22:45:13.208] server-dm-3              <SPSC0001I> Creating HTTP/1.1 connector with scheme http on port 8080.
    [2009-01-22 22:45:13.254] server-dm-3              <SPSC0001I> Creating HTTP/1.1 connector with scheme https on port 8443.
    [2009-01-22 22:45:13.268] server-dm-3              <SPSC0001I> Creating AJP/1.3 connector with scheme http on port 8009.
    [2009-01-22 22:45:13.383] server-dm-3              <SPSC0000I> Starting ServletContainer.
    [2009-01-22 22:45:13.557] server-dm-3              <SPSC0003E> Failed to start ServletContainer.
    LifecycleException:  Protocol handler initialization failed: java.lang.Exception: No Certificate file specified or invalid file format
    	at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
    	at org.apache.catalina.startup.Embedded.start(Embedded.java:830)
    	at com.springsource.server.servlet.tomcat.TomcatServletContainer.start(TomcatServletContainer.java:699)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    	at java.security.AccessController.doPrivileged(Native Method)

  6. #6
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default

    A quick Google search points out that this exception comes from native code.

    Thus, please make sure that you do not have any native Tomcat code that is conflicting with the standard connectors used by the embedded Tomcat in dm Server. Specifically, make sure that you are not using APR when launching the dm Server. You might find Filip Hanik's comments in JIRA helpful as well.

    Regards,

    Sam
    Last edited by Sam Brannen; Jan 24th, 2009 at 11:38 AM.

  7. #7
    Join Date
    Mar 2007
    Posts
    23

    Default

    use Little Snitch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •