Uploaded image for project: 'Abdera'
  1. Abdera
  2. ABDERA-297

UnsupportedOperationException while initializing MimeTypeHelper

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:

      Description

      The Geronimo Activation 1.1 spec implementation of the javax.activation.MimeType tries to call the method setPrimaryType during the construction of the MimeType. This results in a call to MimeTypeHelper$UnmodifiableMimeType.setPrimaryType which then results in a UnsupportedOperationException.

      See error message below:

      Feb 28, 2012 12:25:05 AM org.apache.abdera2.common.protocol.TransactionalRequestProcessor apply
      SEVERE: java.lang.ExceptionInInitializerError
      Feb 28, 2012 12:25:05 AM org.apache.abdera2.common.protocol.ProviderHelper servererror
      INFO: null
      Throwable occurred: java.lang.ExceptionInInitializerError
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:222)
      at org.apache.abdera2.activities.protocol.ActivitiesResponseContext.getContentType(ActivitiesResponseContext.java:88)
      at org.apache.abdera2.activities.protocol.ActivitiesResponseContext.<init>(ActivitiesResponseContext.java:50)
      at org.apache.abdera2.activities.protocol.ActivitiesResponseContext.<init>(ActivitiesResponseContext.java:41)
      at org.apache.abdera2.activities.protocol.AbstractActivitiesWorkspaceProvider.createErrorResponse(AbstractActivitiesWorkspaceProvider.java:88)
      at org.apache.abdera2.common.protocol.ProviderHelper.createErrorResponse(ProviderHelper.java:98)
      at org.apache.abdera2.common.protocol.ProviderHelper.createErrorResponse(ProviderHelper.java:87)
      at org.apache.abdera2.common.protocol.ProviderHelper.notfound(ProviderHelper.java:156)
      at org.apache.abdera2.common.protocol.ProviderHelper.notfound(ProviderHelper.java:160)
      at org.apache.abdera2.activities.protocol.basic.BasicAdapter$4.apply(BasicAdapter.java:228)
      at org.apache.abdera2.activities.protocol.basic.BasicAdapter$4.apply(BasicAdapter.java:1)
      at org.apache.abdera2.common.protocol.RequestProcessor.actuallyApply(RequestProcessor.java:68)
      at org.apache.abdera2.common.protocol.TransactionalRequestProcessor.apply(TransactionalRequestProcessor.java:62)
      at org.apache.abdera2.common.protocol.RequestProcessor.apply(RequestProcessor.java:1)
      at org.apache.abdera2.common.misc.Chain.next(Chain.java:48)
      at org.apache.abdera2.common.misc.Chain.apply(Chain.java:54)
      at org.apache.abdera2.common.protocol.AbstractProvider.apply(AbstractProvider.java:117)
      at org.apache.abdera2.common.protocol.AbstractProvider.apply(AbstractProvider.java:1)
      at org.apache.abdera2.common.protocol.servlet.AbstractAbderaServlet.process(AbstractAbderaServlet.java:89)
      at org.apache.abdera2.common.protocol.servlet.AbderaServlet.service(AbderaServlet.java:35)
      at org.apache.abdera2.examples.activities.ActivitiesServlet.service(ActivitiesServlet.java:21)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:355)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:567)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:147)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:126)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
      at org.mortbay.jetty.Server.handle(Server.java:248)
      at org.mortbay.jetty.HttpConnection.handlerRequest(HttpConnection.java:360)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:614)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:197)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:288)
      at org.mortbay.jetty.nio.SelectChannelConnector$HttpChannelEndPoint.run(SelectChannelConnector.java:805)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      Caused by: java.lang.UnsupportedOperationException
      at org.apache.abdera2.common.mediatype.MimeTypeHelper$UnmodifiableMimeType.setPrimaryType(MimeTypeHelper.java:465)
      at javax.activation.MimeType.parseMimeType(MimeType.java:123)
      at javax.activation.MimeType.<init>(MimeType.java:46)
      at org.apache.abdera2.common.mediatype.MimeTypeHelper$UnmodifiableMimeType.<init>(MimeTypeHelper.java:452)
      at org.apache.abdera2.common.mediatype.MimeTypeHelper.unmodifiableMimeType(MimeTypeHelper.java:400)
      at org.apache.abdera2.common.mediatype.MimeTypeHelper.createWildcard(MimeTypeHelper.java:68)
      at org.apache.abdera2.common.mediatype.MimeTypeHelper.<clinit>(MimeTypeHelper.java:45)
      at java.lang.J9VMInternals.initializeImpl(Native Method)
      at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
      ... 36 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dennypc Denny Pichardo
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: