struct中出现id to load is required for loading的错误

本文介绍了一种常见的数据库错误——idtoloadisrequiredforloading,并提供了具体的解决方案。该错误通常发生在JSP表单提交时未包含必要的ID值,通过在表单中增加隐藏字段<s:hidden name=id>可以有效避免此类问题。

错误信息如下:




所有的错误信息如上。

这是今天遇到的问题,出现这样的问题是因为数据库某些配置不能为null的值,在提交时为null值。所以导致这样的错误。

我错误的原因是因为在jsp提交表单时没有提交id值导致出现id to load is required for loading的错误,解决方法是在jsp的表单中加入<s:hidden name="id"></s:hidden>。问题自然迎刃而解。

/** * * Retrieve a burst of input packets from a receive queue of an Ethernet * device. The retrieved packets are stored in *rte_mbuf* structures whose * pointers are supplied in the *rx_pkts* array. * * The rte_eth_rx_burst() function loops, parsing the RX ring of the * receive queue, up to *nb_pkts* packets, and for each completed RX * descriptor in the ring, it performs the following operations: * * - Initialize the *rte_mbuf* data structure associated with the * RX descriptor according to the information provided by the NIC into * that RX descriptor. * * - Store the *rte_mbuf* data structure into the next entry of the * *rx_pkts* array. * * - Replenish the RX descriptor with a new *rte_mbuf* buffer * allocated from the memory pool associated with the receive queue at * initialization time. * * When retrieving an input packet that was scattered by the controller * into multiple receive descriptors, the rte_eth_rx_burst() function * appends the associated *rte_mbuf* buffers to the first buffer of the * packet. * * The rte_eth_rx_burst() function returns the number of packets * actually retrieved, which is the number of *rte_mbuf* data structures * effectively supplied into the *rx_pkts* array. * A return value equal to *nb_pkts* indicates that the RX queue contained * at least *rx_pkts* packets, and this is likely to signify that other * received packets remain in the input queue. Applications implementing * a "retrieve as much received packets as possible" policy can check this * specific case and keep invoking the rte_eth_rx_burst() function until * a value less than *nb_pkts* is returned. * * This receive method has the following advantages: * * - It allows a run-to-completion network stack engine to retrieve and * to immediately process received packets in a fast burst-oriented * approach, avoiding the overhead of unnecessary intermediate packet * queue/dequeue operations. * * - Conversely, it also allows an asynchronous-oriented processing * method to retrieve bursts of received packets and to immediately * queue them for further parallel processing by another logical core, * for instance. However, instead of having received packets being * individually queued by the driver, this approach allows the caller * of the rte_eth_rx_burst() function to queue a burst of retrieved * packets at a time and therefore dramatically reduce the cost of * enqueue/dequeue operations per packet. * * - It allows the rte_eth_rx_burst() function of the driver to take * advantage of burst-oriented hardware features (CPU cache, * prefetch instructions, and so on) to minimize the number of CPU * cycles per packet. * * To summarize, the proposed receive API enables many * burst-oriented optimizations in both synchronous and asynchronous * packet processing environments with no overhead in both cases. * * The rte_eth_rx_burst() function does not provide any error * notification to avoid the corresponding overhead. As a hint, the * upper-level application might check the status of the device link once * being systematically returned a 0 value for a given number of tries. * * @param port_id * The port identifier of the Ethernet device. * @param queue_id * The index of the receive queue from which to retrieve input packets. * The value must be in the range [0, nb_rx_queue - 1] previously supplied * to rte_eth_dev_configure(). * @param rx_pkts * The address of an array of pointers to *rte_mbuf* structures that * must be large enough to store *nb_pkts* pointers in it. * @param nb_pkts * The maximum number of packets to retrieve. * @return * The number of packets actually retrieved, which is the number * of pointers to *rte_mbuf* structures effectively supplied to the * *rx_pkts* array. */ static inline uint16_t rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id, struct rte_mbuf **rx_pkts, const uint16_t nb_pkts) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; uint16_t nb_rx; #ifdef RTE_LIBRTE_ETHDEV_DEBUG RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0); RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0); if (queue_id >= dev->data->nb_rx_queues) { RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id); return 0; } #endif nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id], rx_pkts, nb_pkts); #ifdef RTE_ETHDEV_RXTX_CALLBACKS struct rte_eth_rxtx_callback *cb; /* __ATOMIC_RELEASE memory order was used when the * call back was inserted into the list. * Since there is a clear dependency between loading * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is * not required. */ cb = __atomic_load_n(&dev->post_rx_burst_cbs[queue_id], __ATOMIC_RELAXED); if (unlikely(cb != NULL)) { do { nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx, nb_pkts, cb->param); cb = cb->next; } while (cb != NULL); } #endif return nb_rx; }解释
最新发布
11-12
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值