2 Replies Latest reply on Apr 1, 2004 2:23 PM by Dennis Przybyla

    Foreign key as a Primary Key

    Dennis Przybyla Novice

      I have looked all over the place for an answer for this. I want to use a foreign key as a primary key. How do I declare this using xdoclet.

      I am doing this in two instances:

      1) I am doing this in a one-to-one relationship where the foreign key is the same as the primary key.

      2) I need to know how to do this in a composite primary key. I have successfuly declared a Entity Bean to generate a Primary Key Class but it does not generate code for the foreign key in the Primary Key Class.

      /***************************************
       * *
       * JBoss: The OpenSource J2EE WebOS *
       * *
       * Distributable under LGPL license. *
       * See terms of license at gnu.org. *
       * *
       ***************************************/
      package org.jboss.nukes.addons.modules.test.ejb;
      
      
      import javax.ejb.EntityBean;
      import javax.ejb.CreateException;
      import javax.ejb.EntityContext;
      
      import java.util.Collection;
      
      /**
       * MediaHasMissions EJB for the test module
       *
       * @author <a href="mailto:dennisp@sncorp.com">Dennis Przybyla</a>
       * @version $Revision: 1.1 $
       *
       * @ejb.bean
       * name="MediaHasMissionsEJB"
       * displayContent-name="MediaHasMissions"
       * type="CMP"
       * cmp-version="2.x"
       * view-type="local"
       * local-jndi-name="nukes/test/MediaHasMissions"
       * schema="MediaHasMissions"
       *
       * @ejb.pk
       * extends="java.lang.Object"
       * package="org.jboss.nukes.addons.modules.test.ejb"
       * generate="true"
       *
       * @ejb.transaction
       * type="Required"
       *
       * @ejb.persistence
       * table-name="MediaHasMissions"
       *
       * @jboss.persistence
       * create-table="true"
       * remove-table="false"
       *
       * @jboss.entity-command
       * name="nukes-entity-command"
       *
       */
      public abstract class MediaHasMissionsEJB implements EntityBean
      {
      
       /**
       * @ejb.create-method
       */
       public Long ejbCreate(MediaEJBLocal media, MissionEJBLocal mission)
       throws CreateException
       {
       return null;
       }
      
      
       public void ejbPostCreate(MediaEJBLocal media, MissionEJBLocal mission)
       throws CreateException
       {
       setMission(mission);
       setMedia(media);
       }
      
       /**
       * @ejb.interface-method
       * @ejb.relation
       * name="MediaLink-Missions"
       * role-name="MediaLink-has-Missions"
       * @ejb.pk-field
       * @jboss.relation
       * fk-column="missionId"
       * related-pk-field="missionId"
       */
       public abstract org.jboss.nukes.addons.modules.test.ejb.MissionEJBLocal getMission();
      
       /**
       * @ejb.interface-method
       */
       public abstract void setMission(org.jboss.nukes.addons.modules.test.ejb.MissionEJBLocal mission);
      
       /**
       * @ejb.interface-method
       * @ejb.relation
       * name="MissionLinks-Media"
       * role-name="MissionLinks-has-Media"
       * @ejb.pk-field
       * @jboss.relation
       * fk-column="mediaId"
       * related-pk-field="mediaId"
       */
       public abstract org.jboss.nukes.addons.modules.test.ejb.MediaEJBLocal getMedia();
      
       /**
       * @ejb.interface-method
       */
       public abstract void setMedia(org.jboss.nukes.addons.modules.test.ejb.MediaEJBLocal media);
      
       // ejb callbacks ------------------------------------------------------------
      
       public void ejbActivate() { }
       public void ejbPassivate() { }
       public void ejbRemove() { }
       public void setEntityContext(EntityContext entityContext) { }
       public void unsetEntityContext() { }
       public void ejbLoad() { }
       public void ejbStore() { }
      
      }
      


      This code generates the following PK Class:

      /*
       * Generated by XDoclet - Do not edit!
       */
      package org.jboss.nukes.addons.modules.test.ejb;
      
      /**
       * Primary key for MediaHasMissionsEJB.
       */
      public class MediaHasMissionsEJBPK
       extends java.lang.Object
       implements java.io.Serializable
      {
       private int _hashCode = 0;
       private StringBuffer _toStringValue = null;
      
       public MediaHasMissionsEJBPK()
       {
       }
      
       public MediaHasMissionsEJBPK( )
       {
       }
      
       public int hashCode()
       {
       if( _hashCode == 0 )
       {
       }
      
       return _hashCode;
       }
      
       public boolean equals(Object obj)
       {
       if( !(obj instanceof org.jboss.nukes.addons.modules.test.ejb.MediaHasMissionsEJBPK) )
       return false;
      
       org.jboss.nukes.addons.modules.test.ejb.MediaHasMissionsEJBPK pk = (org.jboss.nukes.addons.modules.test.ejb.MediaHasMissionsEJBPK)obj;
       boolean eq = true;
      
       if( obj == null )
       {
       eq = false;
       }
       else
       {
       }
      
       return eq;
       }
      
       /** @return String representation of this pk in the form of [.field1.field2.field3]. */
       public String toString()
       {
       if( _toStringValue == null )
       {
       _toStringValue = new StringBuffer("[.");
       _toStringValue.append(']');
       }
      
       return _toStringValue.toString();
       }
      
      }
      


      notice the second constructor has no code for the Foreign Key.

      Any Ideas would really be appreciated.

        • 1. Re: Foreign key as a Primary Key
          Alexey Loubyansky Master

          This is done by mapping foreign key fields to primary key columns.
          Your example is incorrect as it declares CMR fields as primary keys. Only CMP fields can be primary keys.

          • 2. Re: Foreign key as a Primary Key
            Dennis Przybyla Novice

            Here is a Primary Key related to a Foriegn key relation in a one to one relation.

            /***************************************
             * *
             * JBoss: The OpenSource J2EE WebOS *
             * *
             * Distributable under LGPL license. *
             * See terms of license at gnu.org. *
             * *
             ***************************************/
            package org.jboss.nukes.addons.modules.kingpin.ejb;
            
            import javax.ejb.EntityBean;
            import javax.ejb.CreateException;
            import javax.ejb.EntityContext;
            
            import java.util.Collection;
            
            /**
             * Tape EJB for the kingpin module
             *
             * @author <a href="mailto:dennisp@sncorp.com">Dennis Przybyla</a>
             * @version $Revision: 1.5 $
             *
             * @ejb.bean
             * name="Tape"
             * displayContent-name="Tape"
             * type="CMP"
             * cmp-version="2.x"
             * view-type="both"
             * jndi-name="nukes/kingpin/Tape"
             * local-jndi-name="nukes/kingpin/TapeLocal"
             * schema="Tape"
             * primkey-field="mediaId"
             *
             * @ejb.transaction
             * type="Required"
             *
             * @ejb.persistence
             * table-name="Tape"
             *
             * @ejb.finder
             * signature="org.jboss.nukes.addons.modules.kingpin.ejb.TapeEJBLocal findByPrimaryKey(java.lang.Long id)"
             *
             * @jboss.persistence
             * create-table="true"
             * remove-table="false"
             *
             * @jboss.entity-command
             * name="default"
             *
             */
            public abstract class TapeEJB implements EntityBean {
            
             /**
             * @ejb.create-method
             */
             public Long ejbCreate(Long mediaId, String tapeNumber, String tapeType)
             throws CreateException {
            
             setTapeNumber(tapeNumber);
             setTapeType(tapeType);
             System.out.println("record inserted");
             setMediaId(mediaId);
             return null;
             }
            
             public void ejbPostCreate(Long mediaId, String tapeNumber, String tapeType)
             throws CreateException {
             System.out.println("post create done");
             }
            
             /**
             * @ejb.interface-method
             * @ejb.persistence
             * column-name="media_id"
             * @jboss.persistence
             * auto-increment="false"
             */
             public abstract Long getMediaId();
            
             public abstract void setMediaId(Long mediaId);
            
             /**
             * @ejb.interface-method
             * @ejb.relation
             * name="Tape-Media"
             * role-name="Tape-is-a-Media"
             * target-ejb="Media"
             * target-role-name="Media-is-a-Tape"
             * multiplicity="many"
             * @jboss.relation
             * fk-column="media_id"
             * related-pk-field="mediaId"
             * @jboss.target-relation
             * fk-column="media_id"
             * related-pk-field="mediaId"
             */
             public abstract org
             .jboss
             .nukes
             .addons
             .modules
             .kingpin
             .ejb
             .MediaLocal getMedia();
            
             /**
             * @ejb.interface-method
             */
             public abstract void setMedia(
             org.jboss.nukes.addons.modules.kingpin.ejb.MediaLocal media);
            
             /**
             * @ejb.interface-method
             * @ejb.persistence
             * column-name="tape_number"
             */
             public abstract String getTapeNumber();
            
             /**
             * @ejb.interface-method
             * @ejb.persistence
             * column-name="tape_number"
             */
             public abstract void setTapeNumber(String tapeNumber);
            
             /**
             * @ejb.interface-method
             * @ejb.persistence
             * column-name="tape_type"
             */
             public abstract String getTapeType();
            
             /**
             * @ejb.interface-method
             * @ejb.persistence
             * column-name="tape_type"
             */
             public abstract void setTapeType(String tapeType);
            
             // ejb callbacks ------------------------------------------------------------
            
             public void ejbActivate() {
             }
             public void ejbPassivate() {
             }
             public void ejbRemove() {
             }
             public void setEntityContext(EntityContext entityContext) {
             }
             public void unsetEntityContext() {
             }
             public void ejbLoad() {
             }
             public void ejbStore() {
             }
            }
            


            This works fine when media and tape both have the same id numbers in thier tables. In other words if all ids in the media table match all the ids in the tape table it works fine. however I also have a ftp table, and a dbExportFile table that are also a one-to-one relationship with media. when you add an ftp record then add an tape you get an error. I would expect that the ftp record should have an id of 1 in both the media and ftp table which is correct. when I add the tape I would expect it to create a media and a tape record with both the primary keys set to 2.

            2004-04-01 10:13:02,101 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: null, causedBy:
            javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=2
             at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:158)
             at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:297)
             at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
             at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
             at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
             at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
             at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:489)
             at org.jboss.ejb.Container.invoke(Container.java:700)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.invokeRemoveRelation(JDBCCMRFieldBridge.java:1109)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.createRelationLinks(JDBCCMRFieldBridge.java:848)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge$CMRChainLink.createRelations(JDBCCMP2xFieldBridge.java:545)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge$CMRChainLink.doExecute(JDBCCMP2xFieldBridge.java:535)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge$ChainLink.execute(JDBCCMP2xFieldBridge.java:474)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.setInstanceValue(JDBCCMP2xFieldBridge.java:210)
             at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setValue(JDBCAbstractCMPFieldBridge.java:231)
             at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:121)
             at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
             at org.jboss.nukes.addons.modules.kingpin.ejb.TapeEJB$Proxy.setMediaId(<generated>)
             at org.jboss.nukes.addons.modules.kingpin.ejb.TapeEJB.ejbCreate(TapeEJB.java:61)
             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:324)
             at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:175)
             at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:269)
             at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:581)
             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:324)
             at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1043)
             at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
             at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
             at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
             at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
             at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:89)
             at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
             at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
             at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
             at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
             at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
             at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
             at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
             at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
             at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
             at org.jboss.ejb.Container.invoke(Container.java:720)
             at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293)
             at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
             at $Proxy99.create(Unknown Source)
             at org.jboss.nukes.addons.modules.kingpin.KingpinModule.displayAddTape(KingpinModule.java:444)
             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:324)
             at org.jboss.nukes.module.ModuleSupport.operation(ModuleSupport.java:115)
             at org.jboss.nukes.module.ModuleSupport.process(ModuleSupport.java:90)
             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:324)
             at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
             at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
             at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
             at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
             at org.jboss.nukes.mx.LifeCycleInterceptor.invoke(LifeCycleInterceptor.java:93)
             at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
             at org.jboss.nukes.core.Main$LastNext.process(Main.java:535)
             at org.jboss.nukes.core.modules.html.HtmlModule$1.process(HtmlModule.java:180)
             at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
             at org.jboss.nukes.core.modules.core.CoreModule$3.process(CoreModule.java:398)
             at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
             at org.jboss.nukes.core.modules.block.BlockModule$3.process(BlockModule.java:790)
             at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
             at org.jboss.nukes.core.modules.theme.ThemeModule$2.process(ThemeModule.java:233)
             at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
             at org.jboss.nukes.core.modules.user.UserModule$2.process(UserModule.java:1360)
             at org.jboss.nukes.core.Main$HandlerNext.process(Main.java:496)
             at org.jboss.nukes.core.Main.process(Main.java:116)
             at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:324)
             at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
             at org.jboss.nukes.servlet.NukeServlet.doGet(NukeServlet.java:166)
             at org.jboss.nukes.servlet.NukeServlet.doPost(NukeServlet.java:110)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
             at org.jboss.nukes.servlet.TransactionFilter.doFilter(TransactionFilter.java:95)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
             at org.jboss.nukes.servlet.FileUploadFilter.doFilter(FileUploadFilter.java:64)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
             at org.jboss.nukes.servlet.CompressFilter.doFilter(CompressFilter.java:113)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
             at org.jboss.nukes.servlet.DatabasePollerFilter.doFilter(DatabasePollerFilter.java:88)
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
             at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
             at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
             at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
             at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
             at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
             at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
             at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
             at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
             at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
             at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
             at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
             at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
             at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
             at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
             at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
             at java.lang.Thread.run(Thread.java:534)