jagornet/dhcp

Server throws ClassCastException when loading IA_PD binding from database

agrabil opened this issue · 0 comments

The server fails to load an existing IA_PD binding from the database with a ClassCastException:

2015-09-04 23:22:40,623 [pool-2-thread-3] INFO request.DhcpV6SolicitProcessor - Processing IA_PD Solicit:
DhcpV6IaPdOption: iaId=221572909 t1=0 t2=0
IA_PREFIXES
DhcpV6IaPrefixOption: ipAddress=0:0:0:0:0:0:0:0 prefixLength=56 preferredLifetime=0 validLifetime=0
2015-09-04 23:22:40,742 [pool-2-thread-3] INFO binding.BaseBindingManager - Found current binding for IA: duid=0003000114d64d34ef2d iatype=3(PD) iaid=221572909 state=3
2015-09-04 23:22:40,747 [pool-2-thread-3] ERROR binding.BaseBindingManager - Failed to find current binding
java.lang.ClassCastException: com.jagornet.dhcp.db.IaAddress cannot be cast to com.jagornet.dhcp.db.IaPrefix
at com.jagornet.dhcp.server.request.binding.V6PrefixBindingManagerImpl.buildBindingFromIa(V6PrefixBindingManagerImpl.java:446)
at com.jagornet.dhcp.server.request.binding.BaseBindingManager.findCurrentBinding(BaseBindingManager.java:301)
at com.jagornet.dhcp.server.request.binding.V6PrefixBindingManagerImpl.findCurrentBinding(V6PrefixBindingManagerImpl.java:264)
at com.jagornet.dhcp.server.request.DhcpV6SolicitProcessor.process(DhcpV6SolicitProcessor.java:222)
at com.jagornet.dhcp.server.request.BaseDhcpV6Processor.processMessage(BaseDhcpV6Processor.java:435)
at com.jagornet.dhcp.server.request.DhcpV6MessageHandler.handleClientRequest(DhcpV6MessageHandler.java:196)
at com.jagornet.dhcp.server.request.DhcpV6MessageHandler.handleRelayForward(DhcpV6MessageHandler.java:131)
at com.jagornet.dhcp.server.request.DhcpV6MessageHandler.handleMessage(DhcpV6MessageHandler.java:81)
at com.jagornet.dhcp.server.netty.DhcpV6ChannelHandler.messageReceived(DhcpV6ChannelHandler.java:73)
at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:95)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:558)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:777)
at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.run(ChannelUpstreamEventRunnable.java:44)
at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)